-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Installing: Invalid environment marker: python_version<"3.4" #358
Comments
Try to update setuptools and see if the problem goes away. |
$ pip install --upgrade --user setuptools pip
Collecting setuptools
Using cached setuptools-26.0.0-py2.py3-none-any.whl
Requirement already up-to-date: pip in /Users/moylop260/Library/Python/2.7/lib/python/site-packages
Installing collected packages: setuptools
Successfully installed setuptools-1.1.6
$ pip install --user --upgrade git+https://github.com/PyCQA/astroid@41a0c
Collecting git+https://github.com/PyCQA/astroid@41a0c
Cloning https://github.com/PyCQA/astroid (to 41a0c) to /var/folders/zc/1m37yppx4z5596yfyzg385140000gn/T/pip-4l21cO-build
Could not find a tag or branch '41a0c', assuming commit.
Complete output from command python setup.py egg_info:
error in astroid setup command: Invalid environment marker: python_version<"3.4"
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /var/folders/zc/1m37yppx4z5596yfyzg385140000gn/T/pip-4l21cO-build/ FYI our CI show the same error: https://travis-ci.org/Vauxoo/pylint-odoo/jobs/154185968#L456 |
Why does it say |
You are right! virtualenv /tmp/test
cd /tmp/test
source bin/activate
pip install --upgrade setuptools pip
python -c "import setuptools;print setuptools.__version__"
# 26.0.0
pip install --upgrade git+https://github.com/PyCQA/astroid@41a0c
Successfully installed astroid-1.5.0... We have the same issue with our travis. |
The problem is setuptools has incompatibility with itself for environment markers. And setuptools downgrading to 1.1.6 on travis is not something I have seen before, and should be considered a bug somewhere else (not astroid). It might be another case of #4194 (which I have only glanced at, so I might be off base there). |
The advantage is universal wheels. And the disadvantages are it doesnt work on many versions of setup tools, unless my hack is added. |
Does this issue still has to be open? From my point of view, the environment markers are quite important when having to deal with multiple Python releases, each with a different set of dependencies, which is why 41a0c77 (and similar commits in pylint) was made in the first place. A release was fudged, because the wheel was built with 3.5, but the installation failed on older 3.X versions. |
The release is a universal wheel, so that should not matter. |
I might have forgot the details, but this happened because some of On Aug 23, 2016 9:02 AM, "John Vandenberg" notifications@github.com wrote:
|
Ah ok. Yes environment markers are needed. But this bug is about older setuptools not understanding environment markers, even as recently as setuptools 21. |
I know that, the question is if we have to do something here, from astroid's perspective. Requiring a more up to date setuptools version seems weird, since it is not a dependency per se of the library. |
I don't know if is a good idea for you but I added the old code with new one for full compatibility. |
Do we still need this opened? |
For record |
Suggested here for someone else with a similar (or identical) problem: pylint-dev/astroid#358 (comment)
* Make pylint and yapf happy with test_xsrftool.py. * Make pylint and yapf happy with test_searcher.py. * Update lint tool. * Add partial linting to Travis tests. * leave TODOs alone * add comment on separate yapf and pylint lists * Run lint tool under Python 2. * Add python-setuptools to Travis install step. Seems to be required with the older version of Python 2.7. * Revert "Add python-setuptools to Travis install step." This reverts commit c6360b4. It didn't help. * Add lint script to tools/all_tests. * Run style checks first for Travis. * Try updating setuptools. Suggested here for someone else with a similar (or identical) problem: pylint-dev/astroid#358 (comment) * Use pylint 1.9.2, because it supports Python 2.
Steps to reproduce
pip install --upgrade git+https://github.com/PyCQA/astroid@41a0c
Current behaviour
Error
Expected behavior
No error
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
outputSha: 41a0c77
python --version
Python 2.7.10
python -m pip --version
pip 8.1.2 from /Users/moylop260/Library/Python/2.7/lib/python/site-packages (python 2.7)
python -c "import setuptools;print setuptools.version"
1.1.6
Same case for https://travis-ci.org/Vauxoo/pylint-odoo/jobs/154185968#L456
The text was updated successfully, but these errors were encountered: