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

pip does not seem to be properly using "python_version" in requirements.txt on Windows #3254

Closed
dswhite42 opened this Issue Nov 18, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@dswhite42

dswhite42 commented Nov 18, 2015

I'm running Windows 7 (64-bit) with pip 7.1.2 and virtualenv 13.1.2 . I would like to use a single requirements.txt file to install the appropriate lxml binary for whichever version of Python I am using in my virtual environments.

Here is a sample requirements.txt file:

C:\PyModules\lxml-3.5.0-cp27-none-win_amd64.whl; python_version == '2.7'
C:\PyModules\lxml-3.5.0-cp34-none-win_amd64.whl; python_version == '3.4'
C:\PyModules\lxml-3.5.0-cp35-none-win_amd64.whl; python_version == '3.5'

However pip does not appear to be examining the environment marker "python_version" before attempting to process the WHL file. Running pip install -r requirements.txt within a 2.7 environment gives:

lxml-3.5.0-cp34-none-win_amd64.whl is not a supported wheel on this platform.

and trying it in my 3.4 environment gives:

lxml-3.5.0-cp27-none-win_amd64.whl is not a supported wheel on this platform.
@xavfernandez

This comment has been minimized.

Show comment
Hide comment
@xavfernandez

xavfernandez Nov 18, 2015

Contributor

I can confirm this behavior (on Linux).

This comes from: https://github.com/pypa/pip/blob/e42e822/pip/req/req_install.py#L208-L213 raising in from_line before we tried to evaluate the markers.

It might make more sense to wait until someone tries to install the InstallRequirement before raising...

Contributor

xavfernandez commented Nov 18, 2015

I can confirm this behavior (on Linux).

This comes from: https://github.com/pypa/pip/blob/e42e822/pip/req/req_install.py#L208-L213 raising in from_line before we tried to evaluate the markers.

It might make more sense to wait until someone tries to install the InstallRequirement before raising...

@xavfernandez xavfernandez added the T: bug label Nov 19, 2015

@xavfernandez xavfernandez added this to the 8.0 milestone Dec 2, 2015

@dstufft dstufft removed this from the 8.0 milestone Jan 19, 2016

@burrows-labs

This comment has been minimized.

Show comment
Hide comment
@burrows-labs

burrows-labs Mar 10, 2016

Contributor

I ran into the same issue, #3561

Contributor

burrows-labs commented Mar 10, 2016

I ran into the same issue, #3561

@xavfernandez

This comment has been minimized.

Show comment
Hide comment
@xavfernandez

xavfernandez Apr 8, 2016

Contributor

Solved in #3561

Contributor

xavfernandez commented Apr 8, 2016

Solved in #3561

@xavfernandez xavfernandez added this to the 8.2 milestone Apr 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment