-
-
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: option --single-version-externally-managed not recognized #279
Comments
Thanks, sorry! I've just changed these lines in documentation. Firstly, need to upgrade You won't need to install |
Many thanks 👍 |
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 |
I used the tutorial from homesite but can't remember which version it was. I've installed it just an hour ago. |
Thanks. The site has been updated too http://platformio.org/#!/get-started |
I am still getting the same error. I can install scons with
You said earlier that scons would not be required anymore in 2.3.0 but it is still in your |
@sarfata Don't install packages using
pip install -U pip setuptools
# then
pip install -U platformio |
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:
I still get the same problem when trying to install platformio:
|
@sarfata please give me an output of this command:
P.S: This issue with
P.S.S: Do you use virtualenv? |
I experience the same problem with $ 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. |
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
resolved my issue. Do you have installed |
Yes, I am using pyenv-virtualenv. I will uninstall all other packages and try it again without a virtualenv. |
Just upgrade GLOBAL packages to the latest versions:
|
The problem persists outside any virtualenv. log. And |
@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. |
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 |
@cqql Thanks that help me to resolve this issue. I can switch to previous logic (PlatformIO <2.3), where I revert code to previous logic (based on Please try this build 3189a9d:
|
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 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. |
Thanks. Try 3-rd build 07e49cd:
SCons has been removed from dependencies. Now install it via:
|
That works. Thanks a lot. But of course it would sure be nicer, if |
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 You machine looks good to learn this issue. If you are ready we can try to find solution. First, let's use 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. |
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 |
Sorry as for mistake in command "source piotest/bin/active", it should be |
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) |
This is WDYT? P.S: Here we have another problem - |
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 |
Try to downgrade
Have you reproduced issue again? P.S: |
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:
Your test also worked for me:
|
Installing your 3rd build (07e49cd) also worked. |
@sarfata could you try to install directly without
|
It just works in every combination. I also tried to do it without virtualenvs, but as long as Here are some logs though they are not really interesting. |
@ivankravets It just worked now (including installing Scons). I am not sure what changed before ... Sorry about that and thanks for your support! |
@ivankravets yes it does. |
|
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: |
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. |
I was able to install using the get-platformio.py script. |
@robotdad thank for the report! Have you used PlatformIO before 2.3 release? |
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. |
@robotdad give me please an output of this command (where
|
bottle (0.12.8) Also, scons --version reports 2.3.6 |
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. |
I had this same problem, under Xubuntu 14.04 LTS. Except nothing I tried from above would get past the external version error.
|
@pastcompute, thank you, I added your comment to "solutions" list above. |
Muchas gracias!!! |
Solutions
Using PlatformIO installer script (RECOMMENDED)
Try to install PlatformIO using installer script.
Using
pip --egg
Using temporary hook with
virtualenv
See #279 (comment). Please paste these commands into Terminal:
Users experience
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.
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".
And here's the proof 😄
Best regards,
Harris
The text was updated successfully, but these errors were encountered: