Skip to content
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: option --single-version-externally-managed not recognized #279

Closed
brakmic opened this issue Aug 28, 2015 · 47 comments
Closed

error: option --single-version-externally-managed not recognized #279

brakmic opened this issue Aug 28, 2015 · 47 comments
Assignees
Labels
Milestone

Comments

@brakmic
Copy link

brakmic commented Aug 28, 2015

Solutions

Using PlatformIO installer script (RECOMMENDED)

Try to install PlatformIO using installer script.

Using pip --egg

# firstly install SCons
pip intall --egg scons

# then
pip install -U platformio

Using temporary hook with virtualenv

See #279 (comment). Please paste these commands into Terminal:

[sudo] pip install -U pip setuptools virtualenv

# hook
cd /tmp
virtualenv piotest
source piotest/bin/activate
pip install scons
deactivate
rm -r piotest

# now, install PlatformIO
[sudo] pip install platformio

Users experience

  1. error: option --single-version-externally-managed not recognized #279 (comment)

If this doesn't work for you, please describe your problems in the comments below. Thanks!


Hi,

I get an installation error when trying to install "scons" under Windows 10 x64. 😭
Other packages seem to be installed properly.

D:\src\plarformio>pip install -U pip setuptools scons
Requirement already up-to-date: pip in c:\bin\python27\lib\site-packages
Requirement already up-to-date: setuptools in c:\bin\python27\lib\site-packages
Collecting scons
  Using cached scons-2.3.6.tar.gz
Installing collected packages: scons
  Running setup.py install for scons
    Complete output from command C:\bin\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\harris\\appdata\\local\\
temp\\pip-build-dil9zr\\scons\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, '
exec'))" install --record c:\users\harris\appdata\local\temp\pip-35frnt-record\install-record.txt --single-version-externally-managed --c
ompile:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --single-version-externally-managed not recognized

    ----------------------------------------
Command "C:\bin\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\harris\\appdata\\local\\temp\\pip-build-dil9zr\\
scons\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --recor
d c:\users\harris\appdata\local\temp\pip-35frnt-record\install-record.txt --single-version-externally-managed --compile" failed with erro
r code 1 in c:\users\harris\appdata\local\temp\pip-build-dil9zr\scons

According to this SO thread the problem disappears by using the flag "--egg".

However, I know only very little about python and its environment and wouldn't say that this is a "proper" solution to this problem but at least it worked for me. Maybe there are some of you with similar problems. Just in the case of a more general problem it would be nice to put it somewhere in the docs.

Here's the command I used to install "scons".

pip install -U pip setuptools --egg scons

And here's the proof 😄

D:\src\plarformio>pip install -U pip setuptools --egg scons
Requirement already up-to-date: pip in c:\bin\python27\lib\site-packages
Requirement already up-to-date: setuptools in c:\bin\python27\lib\site-packages
Collecting scons
  Using cached scons-2.3.6.tar.gz
Installing collected packages: scons
  Running setup.py install for scons
Successfully installed scons

Best regards,
Harris

@ivankravets
Copy link
Member

Thanks, sorry! I've just changed these lines in documentation. Firstly, need to upgrade pip and setuptools to the latest version and then install scons and platformio.

You won't need to install scons when PlatformIO 2.3.0 will be released.

@brakmic
Copy link
Author

brakmic commented Aug 28, 2015

Many thanks 👍

@ivankravets
Copy link
Member

Which source did you use when install PlatformIO? Home site or documentation?

See updates: http://docs.platformio.org/en/latest/installation.html#python-package-manager

@ivankravets ivankravets self-assigned this Aug 28, 2015
@ivankravets ivankravets added this to the 2.3.0 milestone Aug 28, 2015
@brakmic
Copy link
Author

brakmic commented Aug 28, 2015

I used the tutorial from homesite but can't remember which version it was. I've installed it just an hour ago.

http://platformio.org/#!/get-started

@ivankravets
Copy link
Member

Thanks. The site has been updated too http://platformio.org/#!/get-started

@sarfata
Copy link

sarfata commented Sep 5, 2015

I am still getting the same error. I can install scons with --egg but pip install -U platformio tries to re-download it and fails:

$ pip install --egg scons
Collecting scons
  Using cached scons-2.3.6.tar.gz
Installing collected packages: scons
  Running setup.py install for scons
Successfully installed scons
$ pip install platformio
Collecting platformio
  Using cached platformio-2.3.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): bottle in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already satisfied (use --upgrade to upgrade): click>=3.2 in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already satisfied (use --upgrade to upgrade): lockfile in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already satisfied (use --upgrade to upgrade): pyserial in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.4.0 in ./.env/lib/python2.7/site-packages (from platformio)
Collecting SCons (from platformio)
  Using cached scons-2.3.6.tar.gz
Installing collected packages: SCons, platformio
  Running setup.py install for SCons
    Complete output from command /Users/thomas/Desktop/teensy/.env/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-build-yl0mcO/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-4WrOYc-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/thomas/Desktop/teensy/.env/include/site/python2.7/SCons:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --single-version-externally-managed not recognized

    ----------------------------------------
Command "/Users/thomas/Desktop/teensy/.env/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-build-yl0mcO/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-4WrOYc-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/thomas/Desktop/teensy/.env/include/site/python2.7/SCons" failed with error code 1 in /private/var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-build-yl0mcO/SCons

You said earlier that scons would not be required anymore in 2.3.0 but it is still in your requirements.txt.

@ivankravets
Copy link
Member

@sarfata Don't install packages using --egg. You won't have ability to uninstall them properly later.

  1. Have you had install PlatformIO earlier?
  2. You should upgrade pip to the latest version:
pip install -U pip setuptools

# then
pip install -U platformio

@ivankravets ivankravets reopened this Sep 6, 2015
@sarfata
Copy link

sarfata commented Sep 6, 2015

Yes I had platformio before and it was working. I started having problems when I tried to update yesterday.

Pip and setuptools are already up to date:

$ pip install -U pip setuptools
/Users/thomas/Desktop/teensy/.env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Requirement already up-to-date: pip in ./.env/lib/python2.7/site-packages
Collecting setuptools
  Downloading setuptools-18.3-py2.py3-none-any.whl (461kB)
    100% |████████████████████████████████| 462kB 923kB/s
Installing collected packages: setuptools
  Found existing installation: setuptools 18.2
    Uninstalling setuptools-18.2:
      Successfully uninstalled setuptools-18.2
Successfully installed setuptools-18.3

I still get the same problem when trying to install platformio:

$ pip install -U platformio
Collecting platformio
/Users/thomas/Desktop/teensy/.env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading platformio-2.3.1.tar.gz (76kB)
    100% |████████████████████████████████| 77kB 1.3MB/s
Requirement already up-to-date: bottle in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already up-to-date: click>=3.2 in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already up-to-date: lockfile in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already up-to-date: pyserial in ./.env/lib/python2.7/site-packages (from platformio)
Requirement already up-to-date: requests>=2.4.0 in ./.env/lib/python2.7/site-packages (from platformio)
Collecting SCons (from platformio)
  Using cached scons-2.3.6.tar.gz
Installing collected packages: SCons, platformio
  Running setup.py install for SCons
    Complete output from command /Users/thomas/Desktop/teensy/.env/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-build-cE50wR/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-UPVHUi-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/thomas/Desktop/teensy/.env/include/site/python2.7/SCons:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --single-version-externally-managed not recognized

    ----------------------------------------
Command "/Users/thomas/Desktop/teensy/.env/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-build-cE50wR/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-UPVHUi-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/thomas/Desktop/teensy/.env/include/site/python2.7/SCons" failed with error code 1 in /private/var/folders/xr/w6jn3gp92k78z7282m27v_1c0000gn/T/pip-build-cE50wR/SCons

@ivankravets
Copy link
Member

@sarfata please give me an output of this command:

pip list

P.S: This issue with error: option --single-version-externally-managed not recognized was fixed in pip 7.0. It seems that you have pip < 7.0 version. Try to upgrade pip directly:

python -c "$(curl -fsSL https://bootstrap.pypa.io/get-pip.py)"

P.S.S: Do you use virtualenv?

@martenlienen
Copy link

I experience the same problem with pip 7.1.2.

$ python -V
Python 2.7.9

$ pip install -U pip setuptools
You are using pip version 6.1.1, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
  Using cached pip-7.1.2-py2.py3-none-any.whl
Collecting setuptools
  Using cached setuptools-18.3.1-py2.py3-none-any.whl
Installing collected packages: pip, setuptools
  Found existing installation: pip 6.1.1
    Uninstalling pip-6.1.1:
      Successfully uninstalled pip-6.1.1
  Found existing installation: setuptools 15.0
    Uninstalling setuptools-15.0:
      Successfully uninstalled setuptools-15.0
Successfully installed pip-7.1.2 setuptools-18.3.1

$ pip list
pip (7.1.2)
setuptools (18.3.1)

$ pip install platformio
Collecting platformio
  Using cached platformio-2.3.1.tar.gz
Collecting bottle (from platformio)
  Using cached bottle-0.12.8.tar.gz
Collecting click>=3.2 (from platformio)
  Using cached click-5.1-py2.py3-none-any.whl
Collecting lockfile (from platformio)
  Using cached lockfile-0.10.2-py2-none-any.whl
Collecting pyserial (from platformio)
  Using cached pyserial-2.7.tar.gz
Collecting requests>=2.4.0 (from platformio)
  Using cached requests-2.7.0-py2.py3-none-any.whl
Collecting SCons (from platformio)
  Using cached scons-2.3.6.tar.gz
Installing collected packages: bottle, click, lockfile, pyserial, requests, SCons, platformio
  Running setup.py install for bottle
  Running setup.py install for pyserial
  Running setup.py install for SCons
    Complete output from command /home/cqql/.pyenv/versions/qopter-fw/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-7azBHM/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-40sAXF-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/cqql/.pyenv/versions/qopter-fw/include/site/python2.7/SCons:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --single-version-externally-managed not recognized

    ----------------------------------------
Command "/home/cqql/.pyenv/versions/qopter-fw/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-7azBHM/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-40sAXF-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/cqql/.pyenv/versions/qopter-fw/include/site/python2.7/SCons" failed with error code 1 in /tmp/pip-build-7azBHM/SCons

Edit: I repeated the steps on a clean install and updated the shell log above.

@ivankravets
Copy link
Member

It seems that I've found where this issue is hidden. Give me please a whole GLOBAL LIST with installed packages(not from virtual environment). If one package depends on pip<7, pip will use it for the rest packages. New version of PlatformIO requires pip>=7 and new setuptools. I've just reproduced this issue in my virtual machine (Linux Ubuntu). Here virtualenv package is used old version of pip/setuptools. The

[sudo] pip install -U setuptools

resolved my issue.

Do you have installed virtualenv package?

@martenlienen
Copy link

Yes, I am using pyenv-virtualenv. I will uninstall all other packages and try it again without a virtualenv.

@ivankravets
Copy link
Member

Just upgrade GLOBAL packages to the latest versions:

[sudo] pip install -U pip setuptools virtualenv

@martenlienen
Copy link

The problem persists outside any virtualenv. log. And virtualenv is not even installed now.

@ivankravets
Copy link
Member

@cqql please try development build:

pip install https://github.com/platformio/platformio/archive/feature/issue-279.zip

P.S: If error still exists, try "twice" command above. Please report me results.

@martenlienen
Copy link

The error persists (log). Did you mean to try the installation twice? The quotes confused me. Trying it twice did not help.

I put some print statements in my pip installation and verified, that it is indeed running 7.1.2 and it passes --single-version-externally-managed to the setup.py every time --egg is not given. But somehow SCons' setup.py does not understand that option.

@ivankravets
Copy link
Member

@cqql Thanks that help me to resolve this issue. I can switch to previous logic (PlatformIO <2.3), where scons has installed via pip install --egg scons, but it isn't good solution. SCons team works on it. This isn't problem of PlatformIO. PlatformIO depends on SCons. The installation process of SCons was fixed in pip>7andsetuptools>=16.

I revert code to previous logic (based on --egg) if we will not found common solution. Currently, only Linux users have these problems.

Please try this build 3189a9d:

pip install https://github.com/platformio/platformio/archive/feature/issue-279.zip

@martenlienen
Copy link

I do not like scons. This is the second scons related issue I ran into (the other happened several months ago) and both times it took both of us a few hours to sort it out.

I tried installing the new build, but to not avail. It is still the same error. I instrumented my pip again with some print statements in req/req_install.py right before the command is called to check the versions

with indent_log():
    import setuptools
    import pip
    print(setuptools.__version__, pip.__version__)          
    call_subprocess( 
        install_args + install_options,
        cwd=self.source_dir,
        show_stdout=False,
    )

and the versions are

Installing collected packages: SCons, platformio
  Running setup.py install for SCons
('18.3.1', '7.1.2')
    Complete output from command /home/cqql/.pyenv/versions/2.7.10/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-uzEFJJ/SCons/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3hpEM3-record/install-record.txt --single-version-externally-managed --compile:

So apparently it is still not working.

@ivankravets
Copy link
Member

Thanks. Try 3-rd build 07e49cd:

pip install https://github.com/platformio/platformio/archive/feature/issue-279.zip

SCons has been removed from dependencies. Now install it via:

pip install --egg SCons

@martenlienen
Copy link

That works. Thanks a lot. But of course it would sure be nicer, if scons could be declared as a dependency. Do you have an idea, why it broke, although the scons developers already worked on this issue?

@ivankravets
Copy link
Member

Do you have an idea, why it broke, although the scons developers already worked on this issue?

They have worked on it a few years... I don't know what SCons uses in the kernel, but it is intended to be installed via OS package managers(not via pip). I asked them a few weeks ago to update scons package in PyPi, because PyPi had contained the packages from 2013 year. Now we have the latest 2.3.6 in the PyPi.


You machine looks good to learn this issue. If you are ready we can try to find solution. First, let's use virtualenv:

pip install -U pip setuptools virtualenv
cd /tmp
virtualenv piotest
source piotest/bin/activate
pip list
pip install scons

Give me please a log of these commands.

@martenlienen
Copy link

The log is

$ pip install -U pip setuptools virtualenv
Requirement already up-to-date: pip in ./.pyenv/versions/2.7.10/lib/python2.7/site-packages
Requirement already up-to-date: setuptools in ./.pyenv/versions/2.7.10/lib/python2.7/site-packages
Collecting virtualenv
  Using cached virtualenv-13.1.2-py2.py3-none-any.whl
Installing collected packages: virtualenv
Successfully installed virtualenv-13.1.2
$ cd /tmp
$ virtualenv piotest
New python executable in piotest/bin/python2.7
Also creating executable in piotest/bin/python
Installing setuptools, pip, wheel...done.
$ source piotest/bin/activate
$ pip list
pip (7.1.2)
setuptools (18.2)
wheel (0.24.0)
$ pip install scons
Collecting scons
Installing collected packages: scons
Successfully installed scons-2.3.6

@ivankravets
Copy link
Member

Sorry as for mistake in command "source piotest/bin/active", it should be source piotest/bin/activate. Please update your comment above, because you are outside virtualenv. Thanks.

@ivankravets ivankravets added this to the 2.3.2 milestone Sep 8, 2015
@martenlienen
Copy link

I absolutely do not understand this. Now it works.

$ pyenv virtualenv pio
$ pyenv shell pio                                                                           
$ pip list
pip (7.1.2)
setuptools (18.2)
$ pip install scons
Collecting scons
Installing collected packages: scons
Successfully installed scons-2.3.6
$ pip install platformio
Collecting platformio
  Using cached platformio-2.3.1.tar.gz
Collecting bottle (from platformio)
  Using cached bottle-0.12.8.tar.gz
Collecting click>=3.2 (from platformio)
  Using cached click-5.1-py2.py3-none-any.whl
Collecting lockfile (from platformio)
  Using cached lockfile-0.10.2-py2-none-any.whl
Collecting pyserial (from platformio)
  Using cached pyserial-2.7.tar.gz
Collecting requests>=2.4.0 (from platformio)
  Using cached requests-2.7.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): SCons in ./.pyenv/versions/pio/lib/python2.7/site-packages (from platformio)
Installing collected packages: bottle, click, lockfile, pyserial, requests, platformio
  Running setup.py install for bottle
  Running setup.py install for pyserial
  Running setup.py install for platformio
Successfully installed bottle-0.12.8 click-5.1 lockfile-0.10.2 platformio-2.3.1 pyserial-2.7 requests-2.7.0
$ python -V
Python 2.7.10
$ pip list
bottle (0.12.8)
click (5.1)
lockfile (0.10.2)
pip (7.1.2)
platformio (2.3.1)
pyserial (2.7)
requests (2.7.0)
scons (2.3.6)
setuptools (18.2)

@ivankravets
Copy link
Member

This is virtualenv... I had the same behaviour :( Strange behaviour. I can add to existing installation virtualenv, but I needn't it. Other solution, to add "Warning" block where propose to update pip install -U pip setuptools virtualenv when error: option --single-version-externally-managed not recognized occurs.

WDYT?

P.S: Here we have another problem - scons --version doesn't work. However, it seems that I can fix it for scon from PlatformIO's side. Give me a few minutes.

@martenlienen
Copy link

It works for me

$ scons --version
SCons by Steven Knight et al.:
    script: v2.3.6.rel_2.3.5:3347:d31d5a4e74b6[MODIFIED], 2015/07/31 14:36:10, by bdbaddog on hpmicrodog
    engine: v2.3.6.rel_2.3.5:3347:d31d5a4e74b6[MODIFIED], 2015/07/31 14:36:10, by bdbaddog on hpmicrodog
    engine path: ['/home/cqql/.pyenv/versions/qopter-fw/lib/python2.7/site-packages/scons-2.3.6/SCons']
Copyright (c) 2001 - 2015 The SCons Foundation

Do you think, it was caused by an outdated virtualenv? I cannot believe that, because I tried it with a fresh install of virtualenv and I even cleaned all my python installations and started anew with 2.7.10. The only thing that changed from 2 hours ago is, that my laptop was suspended for 2 hours.

@ivankravets
Copy link
Member

Try to downgrade virtualenv:

pip uninstall scons
pip install "virtualenv==1.3"
pip list
pip install scons

Have you reproduced issue again?

P.S: scons works for you because you use pyenv. However, it doesn't work when is installed to /usr/local/*.
P.S.S: I see that in previous reports you have used Python 2.7.9. An in the latest, you used Python 2.7.10. Could I ask you to try with Python 2.7.9?

@sarfata
Copy link

sarfata commented Sep 8, 2015

I see we are making lots of progress. Just wanted to say that I am on Mac OS so this is not a Linux only problem. And I do have pip >7:

# pip --version
pip 7.1.2 from /Users/thomas/Desktop/teensy/.env/lib/python2.7/site-packages (python 2.7)
(.env)thomas@dapdap-mbp ~/work-perso/wearaboard 11:20
$ deactivate
thomas@dapdap-mbp ~/work-perso/wearaboard 11:21
$ pip --version
pip 7.1.2 from /Library/Python/2.7/site-packages (python 2.7)

Your test also worked for me:

$ sudo pip install -U pip setuptools virtualenv
Requirement already up-to-date: pip in /Library/Python/2.7/site-packages
Collecting setuptools
  Downloading setuptools-18.3.1-py2.py3-none-any.whl (462kB)
    100% |████████████████████████████████| 462kB 1.1MB/s
Collecting virtualenv
  Downloading virtualenv-13.1.2-py2.py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 314kB/s
Installing collected packages: setuptools, virtualenv
  Found existing installation: setuptools 18.2
    Uninstalling setuptools-18.2:
      Successfully uninstalled setuptools-18.2
  Found existing installation: virtualenv 1.11.4
    Uninstalling virtualenv-1.11.4:
      Successfully uninstalled virtualenv-1.11.4
Successfully installed setuptools-18.3.1 virtualenv-13.1.2
thomas@dapdap-mbp ~/Desktop/teensy 11:23 10110
$ virtualenv piotest
New python executable in piotest/bin/python
Installing setuptools, pip, wheel...done.
thomas@dapdap-mbp ~/Desktop/teensy 11:23 10111
$ source piotest/bin/activate
(piotest)thomas@dapdap-mbp ~/Desktop/teensy 11:23 10112
$ pip list
pip (7.1.2)
setuptools (18.2)
wheel (0.24.0)
(piotest)thomas@dapdap-mbp ~/Desktop/teensy 11:23 10113
$ pip install scons
Collecting scons
  Using cached scons-2.3.6.tar.gz
Building wheels for collected packages: scons
  Running setup.py bdist_wheel for scons
  Stored in directory: /Users/thomas/Library/Caches/pip/wheels/83/2c/cc/77439553dec9a4726e142c05c621cb49d1c2f774662f722f8a
Successfully built scons
Installing collected packages: scons
Successfully installed scons-2.3.6

@sarfata
Copy link

sarfata commented Sep 8, 2015

Installing your 3rd build (07e49cd) also worked.

@ivankravets
Copy link
Member

@sarfata could you try to install directly without virtualenv?

pip install platformio

@martenlienen
Copy link

It just works in every combination. I also tried to do it without virtualenvs, but as long as pip and setuptools are updated, everything works. However, why did it not work this afternoon?

Here are some logs though they are not really interesting.

@sarfata
Copy link

sarfata commented Sep 9, 2015

@ivankravets It just worked now (including installing Scons). I am not sure what changed before ... Sorry about that and thanks for your support!

@ivankravets
Copy link
Member

@cqql @sarfata does PlatformIO work entirely? Can you build any projects via platformio run?

@sarfata
Copy link

sarfata commented Sep 9, 2015

@ivankravets yes it does.

@martenlienen
Copy link

platformio run just installed a program on my arduino without problems.

@ivankravets
Copy link
Member

I reproduced this issue again and temporary solution is described in the original #279 (comment)

It looks stupid/magic for me, but I don't have other options. If someone will find more accurate solution, please report here.

PlatformIO 2.3.2 will be released today.

This "known issue" has been added to main docs:

ivankravets added a commit that referenced this issue Sep 10, 2015
@robotdad
Copy link

I am running into this issue with PlatformIO 2.3.2 on Windows 10. However, pip won't install scons either. I can install scons via their distribution using setup.py or --egg. Even after doing so I still can't install platformio due to this error. Pip list does not show scons present. Scons --version reports 2.3.6.

@robotdad
Copy link

I was able to install using the get-platformio.py script.

@ivankravets
Copy link
Member

@robotdad thank for the report! Have you used PlatformIO before 2.3 release?

@robotdad
Copy link

Yes, I have 2.2 on another machine which is working fine but I'm getting this error on trying to upgrade. I can't recall if it was updated from previous versions or not.

@ivankravets
Copy link
Member

@robotdad give me please an output of this command (where platformio upgrade command doesn't work):

pip list

@robotdad
Copy link

bottle (0.12.8)
click (5.1)
colorama (0.3.3)
lockfile (0.10.2)
pip (7.1.2)
platformio (2.2.2)
pyserial (2.7)
requests (2.7.0)
setuptools (18.3.1)
virtualenv (13.1.2)

Also, scons --version reports 2.3.6

@hoosierEE
Copy link

Thanks @brakmic for the solution at the top of this page. I dusted off a computer with an old version of platformio on it, and following the prompts caused it to become broken. Your solution fixed it for me.

@pastcompute
Copy link

I had this same problem, under Xubuntu 14.04 LTS. Except nothing I tried from above would get past the external version error.
In the end I had to do the following:

@ivankravets
Copy link
Member

@pastcompute, thank you, I added your comment to "solutions" list above.

@danielricardogm
Copy link

Muchas gracias!!!

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

No branches or pull requests

8 participants