You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pipenv does not honor environment markers in requirements.txt, or at least not python_version.
Example that is parsed incorrectly:
wsgiref==0.1.2;python_version<'3.0'
Expected result
wsgiref would be excluded from Pipfile because the Python version is 3 and requirements.txt said python_version<'3.0'.
Actual result
wsgiref is included in Pipfile.
Steps to replicate
Note: the same result is obtained whether or not --three is used and regardless of the whitespace in requirements.txt.
$ echo "wsgiref==0.1.2;python_version<'3.0'" > requirements.txt
$ pipenv install -r requirements.txt
Creating a virtualenv for this project...
Pipfile: /home/mark/tmp/pipenv-test/Pipfile
Using /usr/bin/python3 (3.6.5) to create virtualenv...
[... snip - see "Console output" below ...]
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
wsgiref = "==0.1.2"
[dev-packages]
[requires]
python_version = "3.6"
Console output of `pipenv install`
Since the output of this command is likely unhelpful, I made it hidden by default.
$ pipenv install -r requirements.txt
Creating a virtualenv for this project...
Pipfile: /home/mark/tmp/pipenv-test/Pipfile
Using /usr/bin/python3 (3.6.5) to create virtualenv...
⠋Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/mark/.local/share/virtualenvs/pipenv-test-qka95IxR/bin/python3
Also creating executable in /home/mark/.local/share/virtualenvs/pipenv-test-qka95IxR/bin/python
Installing setuptools, pip, wheel...done.
Setting project for pipenv-test-qka95IxR to /home/mark/tmp/pipenv-test
Virtualenv location: /home/mark/.local/share/virtualenvs/pipenv-test-qka95IxR
Creating a Pipfile for this project...
Requirements file provided! Importing into Pipfile...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
py", line 337, in get_legacy_dependencies
self.resolver.resolve(reqset)
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 107, in resolve
self._resolve_one(requirement_set, req)
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 264, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/resolve.py", line 214, in _get_abstract_dist_for
self.require_hashes
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 328, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 155, in prep_for_dist
self.req.run_egg_info()
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 486, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/mark/.local/lib/python3.6/site-packages/pipenv/patched/notpip/_internal/utils/misc.py", line 698, in call_subprocess
% (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmpoizlzhhxbuild/wsgiref/
Sorry you encountered this. This is a duplicate of #2359 and was already resolved in #2384 (not yet released, but merged into master)
Feel free to test that out and let us know if it isn't working. For the record, if your issue is number 2584, and you think something was incorrectly closed almost 2000 issues ago, but that nobody pointed it out in between, you probably are just missing a few intervening issues :p
Issue description
Pipenv does not honor environment markers in requirements.txt, or at least not
python_version
.Example that is parsed incorrectly:
Expected result
wsgiref would be excluded from Pipfile because the Python version is 3 and requirements.txt said
python_version<'3.0'
.Actual result
wsgiref is included in Pipfile.
Steps to replicate
Note: the same result is obtained whether or not
--three
is used and regardless of the whitespace in requirements.txt.Console output of `pipenv install`
Since the output of this command is likely unhelpful, I made it hidden by default.
Note: The bad error message is due to #2329.
$ pipenv --support
Pipenv version:
'2018.7.1'
Pipenv location:
'/home/mark/.local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/bin/python3'
Other Python installations in
PATH
:3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
3.6.5
:/usr/bin/python3
PEP 508 Information:
System environment variables:
HOSTTYPE
_
LANG
USER
PWD
HOME
NAME
TERM
SHELL
SHLVL
LOGNAME
PATH
OLDPWD
LESS
LS_COLORS
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/mark/local/bin:/home/mark/p/scripts:/home/mark/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files (x86)/vim/vim80:/mnt/c/Users/lodat/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/Oracle/VirtualBox
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/mark/tmp/pipenv-test
Contents of
Pipfile
('/home/mark/tmp/pipenv-test/Pipfile'):The text was updated successfully, but these errors were encountered: