-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Invalid installation of Python requests
package
#252
Comments
Could you try this installer script? https://github.com/platformio/platformio/blob/develop/scripts/get-platformio.py |
Please reopen this issue if you still have this problem. |
Thank you. Sorry for the delayed answer. I have tried on the same x86_64 Cygwin 2.0.4 (host Win 7), python 2.7.10 installation with the script you provided: ==> Installing Python Package Manager ... Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages [SUCCESS] ==> Installing PlatformIO and dependencies ... Requirement already up-to-date: setuptools in /usr/lib/python2.7/site-packages Collecting platformio Requirement already up-to-date: requests>=2.4.0 in /usr/lib/python2.7/site-packages (from platformio) Requirement already up-to-date: bottle in /usr/lib/python2.7/site-packages (from platformio) Requirement already up-to-date: pyserial in /usr/lib/python2.7/site-packages (from platformio) Requirement already up-to-date: click>=3.0 in /usr/lib/python2.7/site-packages (from platformio) Installing collected packages: platformio Successfully installed platformio-2.2.1 Collecting http://dl.platformio.org/scons.zip Downloading http://dl.platformio.org/scons.zip (863kB) Installing collected packages: scons Running setup.py install for scons Successfully installed scons [SUCCESS] ==> Installation process has been successfully FINISHED! <== ---------------------------------------- Please RESTART your Terminal Application ---------------------------------------- Then run `platformio --help` command. So the installation process looks good. But when I restart Cygwin and type (as being told) platformio --help the following error occurs: Error: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/platformio/__main__.py", line 73, in main requests.packages.urllib3.disable_warnings() AttributeError: 'module' object has no attribute 'packages' Please let me know if you need more information or if I can test more. |
Sorry, but I can not re-open this issue since I didn't close it myself. |
Could I ask you to try this build? pip install https://github.com/platformio/platformio/archive/feature/issue-252-cygwin.zip |
Uninstalled the old version. Then installed the build you provided. Result: $ pip install https://github.com/platformio/platformio/archive/feature/issue-252-cygwin.zip Collecting https://github.com/platformio/platformio/archive/feature/issue-252-cygwin.zip Downloading https://github.com/platformio/platformio/archive/feature/issue-252-cygwin.zip / 2.5MB 4.1MB/s Requirement already satisfied (use --upgrade to upgrade): bottle in /usr/lib/python2.7/site-packages (from platformio==2.2.3.dev0) Requirement already satisfied (use --upgrade to upgrade): click>=3.0 in /usr/lib/python2.7/site-packages (from platformio==2.2.3.dev0) Requirement already satisfied (use --upgrade to upgrade): pyserial in /usr/lib/python2.7/site-packages (from platformio==2.2.3.dev0) Requirement already satisfied (use --upgrade to upgrade): requests>=2.4.0 in /usr/lib/python2.7/site-packages (from platformio==2.2.3.dev0) Building wheels for collected packages: platformio Running setup.py bdist_wheel for platformio Stored in directory: /home/aaaaa/.cache/pip/wheels/be/ae/4a/2e4f4672f1b57855e8887a436d44397461868e2edc8259a41c Successfully built platformio Installing collected packages: platformio Successfully installed platformio-2.2.3.dev0 Then typed in platformio --help which results in $ platformio Traceback (most recent call last): File "/usr/bin/platformio", line 7, in from platformio.__main__ import main File "/usr/lib/python2.7/site-packages/platformio/__main__.py", line 10, in from requests.packages import urllib3 ImportError: No module named packages Please let me know if you need more information or if I can test more. Thank you. |
Hm... Do you see this folder |
Unfortunately there is no "packages" dir. The content of /usr/lib/python2.7/site-packages/requests/is: __init__.py auth.py cookies.py models.py structures.py __init__.pyc auth.pyc cookies.pyc models.pyc structures.pyc __init__.pyo auth.pyo cookies.pyo models.pyo structures.pyo adapters.py certs.py exceptions.py sessions.py utils.py adapters.pyc certs.pyc exceptions.pyc sessions.pyc utils.pyc adapters.pyo certs.pyo exceptions.pyo sessions.pyo utils.pyo api.py compat.py hooks.py status_codes.py api.pyc compat.pyc hooks.pyc status_codes.pyc api.pyo compat.pyo hooks.pyo status_codes.pyo |
😮 😮 😮 Give me please an output of:
|
bottle (0.12.8) bsddb3 (6.1.0) bzr (2.6b2) bzr-fastimport (0.13.0.final.0) cffi (0.9.2) chardet (2.2.1) click (4.1) Codeville (0.8.0) cvs2svn (2.4.0) dblatex (0.3.4) fastimport (0.9.2) git-review (1.24) logilab-common (0.62.0) Mako (1.0.1) MarkupSafe (0.23) mercurial (3.3) numpy (1.9.2) Pillow (2.8.1) pip (7.1.0) platformio (2.2.3.dev0) ply (3.6) pycparser (2.12) Pygments (1.6) pygobject (3.14.0) Pyrex (0.9.9) pyserial (2.7) reportlab (2.7) requests (2.7.0) setuptools (18.0.1) simplejson (3.6.5) six (1.9.0) stgit (0.17.1-dirty) tailor (0.9.35) urllib3 (1.10.4) wheel (0.24.0) I did a quick search for "urllib3" and this is the result: /lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3 /lib/python2.7/site-packages/urllib3 /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3 /usr/lib/python2.7/site-packages/urllib3 |
SolutionRun these commands
|
Thank you. This helped and now platformio --helpruns flawlessly :-) I don't know why the fresh Cygwin installation had this issue with requests. Do you have any idea? |
Sorry, don't have any ideas. I've just added to docs/FAQ/code explanation for end user. Thanks! |
I had a related error that references this issue:
thich turned out to be Ubuntu 14.04LTS's install of Solution:
|
requests
package`
requests
package`requests
package
Thanks @DefProc. I've just added your tip to solutions list above. |
please help help with this |
root@localhost:~# setoolkit |
I'm running into this. Ubuntu 16LTS |
@MFornander Fixed in https://github.com/platformio/platformio-core/releases/tag/v3.3.1 Please restart Atom |
Solution
#252 (comment)
Run these commands
For
Ubuntu 14.04LTS
see #252 (comment)Hi,
having installed platformio by calling
under x86_64 Cygwin 2.0.4 (host Win 7), python 2.7.10
Please let me know if you need more information.
The text was updated successfully, but these errors were encountered: