8000 Fix pip version to 2.7. by marcelbuesing · Pull Request #8 · emosenkis/esp-rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.

Fix pip version to 2.7. #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcelbuesing
Copy link

Platformio currently only supports python 2.7 not 3.0. This leads to issues when having both python2 and python3 installed.

I ran into the following error:

Installing platformio...
Collecting platformio
  Downloading platformio-3.5.0.tar.gz (91kB)
    100% |████████████████████████████████| 92kB 2.5MB/s 
    Complete output from command python setup.py egg_info:
    PlatformIO Core v3.5.0 does not run under Python version 3.6.4.
    Minimum supported version is 2.7, please upgrade Python.
    Python 3 is not yet supported.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8vfq5sgq/platformio/

Platformio currently only supports python 2.7 not 3.0.
@@ -49,7 +49,7 @@ function install_toolchain() {
fi
if ! platformio --version &>/dev/null; then
echo 'Installing platformio...'
pip install platformio
pip2.7 install platformio
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work for everyone.

@emosenkis
Copy link
Owner

Is there a way to make this work universally?

@skorokithakis
Copy link
Contributor

Why wouldn't this work? In my experience, pip aliases itself to pip2.7 when installing, so this would only fail if you don't have pip installed. Am I wrong?

@skorokithakis
Copy link
Contributor

Also, a way to avoid needing sudo for this is to attempt a user installation with --user. You'll need to refer to the full path as the directory might not be in the user's path afterwards, but that might be acceptable and it's cleaner than installing system-wide.

@BrendanBall
Copy link

I fixed this locally by creating a virtualenv, but this means I had to remove the --user from pip install platformio --user. imho if you're going to run this outside of docker you should use a virtualenv.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0