platformio-core: Error: Invalid installation of Python `requests` package

Solution

https://github.com/platformio/platformio/issues/252#issuecomment-127072039 Run these commands

pip uninstall requests
pip install requests

For Ubuntu 14.04LTS see https://github.com/platformio/platformio/issues/252#issuecomment-146801166

sudo apt-get remove python-requests
[sudo] pip install requests

Hi, having installed platformio by calling

python get-platformio.py

under x86_64 Cygwin 2.0.4 (host Win 7), python 2.7.10

 ==> Installation process has been successfully FINISHED! <==

 Please RESTART your Terminal Application and run `platformio --help` command.
Traceback (most recent call last):
  File "get-platformio.py", line 145, in <module>
    sys.exit(main())
  File "get-platformio.py", line 138, in main
    "platformio"]))
  File "get-platformio.py", line 69, in exec_python_cmd
    return exec_command([CURINTERPRETER_PATH] + args, shell=IS_WINDOWS).strip()
  File "get-platformio.py", line 64, in exec_command
    raise Exception(err)
Exception: Error: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/platformio/__main__.py", line 73, in ma                                                                   in
    requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'

Please let me know if you need more information.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 19 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I had a related error that references this issue:

Error: Invalid installation of Python `requests` package`. See < https://github.com/platformio/platformio/issues/252 >

thich turned out to be Ubuntu 14.04LTS’s install of python-requests that was causing a problem.

Solution:

sudo apt-get remove python-requests