Pipenv fails to install extras from `Pipfile.lock`
See original GitHub issueIssue description
Pipenv fails to install extras for a dependency if using Pipfile.lock
. This would appear to be related to #1094.
Expected result
Pipenv should install extras regardless of whether Pipefile
or Pipfile.lock
is used, given the two are in sync. However, pip freeze
shows none of the packages required by the desired extra as installed. However, --verbose
output shows that installation is occurring:
Actual result
Pipenv only installs extras when installing from Pipfile
.
Steps to replicate
Pipfile
(sanitized):
foo = {extras = ["gps"], git = "git@private.git.server.com/foo.git", ref = "some-ref"}
When I install in my development environment via pipenv update
, the extra is installed. My Pipfile.lock
contains:
"foo": {
"extras": [
"gps"
],
"git": "git@private.git.server.com/foo.git",
"ref": "XXXXXXX"
},
When installing for production via:
$ pipenv install --deploy --system --verbose
The extra is not installed. And I see the following output:
#15 15.27 Collecting foo[gps]
#15 15.27 Cloning ssh://****@private.git.server.com/foo.git (to revision XXXXXXXX) to /tmp/pip-install-j6hv06g5/foo
#15 15.27 Added foo[gps] from git+ssh://****@private.git.server.com/foo.git@XXXXXXX#egg=foo[gps] (from -r /tmp/pipenv-_vqdslph-requirements/pipenv-ey5b5tem-requirement.txt (line 1)) to build tracker '/tmp/pip-req-tracker-td0jikde'
#15 15.27 Running setup.py (path:/tmp/pip-install-j6hv06g5/foo/setup.py) egg_info for package foo
#15 15.27 Created temporary directory: /tmp/pip-pip-egg-info-8ta1ltk_
#15 15.27 Source in /tmp/pip-install-j6hv06g5/foo has version 0.6.0, which satisfies requirement foo[gps] from git+ssh://****@private.git.server.com/foo.git@XXXXXXXX#egg=foo[gps] (from -r /tmp/pipenv-_vqdslph-requirements/pipenv-ey5b5tem-requirement.txt (line 1))
#15 15.27 Removed foo[gps] from git+ssh://****@private.git.server.com/foo.git@XXXXXXXX#egg=foo[gps] (from -r /tmp/pipenv-_vqdslph-requirements/pipenv-ey5b5tem-requirement.txt (line 1)) from build tracker '/tmp/pip-req-tracker-td0jikde'
If I instead install via:
$ pipenv install --deploy --system --skip-lock --verbose
Then the extra is installed and I see output similar to that above but with an additional line at the end:
#15 31.30 Installing extra requirements: 'gps'
$ pipenv --support
Pipenv version: '2020.6.2'
Pipenv location: '/usr/local/lib/python3.8/site-packages/pipenv'
Python location: '/usr/local/opt/python@3.8/bin/python3.8'
Python installations found:
3.8.1
:/usr/local/opt/python@3.8/bin/python3
3.8.1
:/usr/local/opt/python@3.8/bin/python3.8
3.7.6
:/usr/local/bin/python3
3.7.6
:/usr/local/bin/python3.7m
3.7.6
:/usr/local/bin/python3.7
2.7.10
:/usr/bin/python2.7
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.8.1',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '18.2.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 18.2.0: Fri Oct 5 19:41:49 PDT '
'2018; root:xnu-4903.221.2~2/RELEASE_X86_64',
'python_full_version': '3.8.1',
'python_version': '3.8',
'sys_platform': 'darwin'}
System environment variables:
USER
TERMINAL_EMULATOR
HOME
COMMAND_MODE
LOGIN_SHELL
XPC_SERVICE_NAME
LOGNAME
TMPDIR
SHELL
__INTELLIJ_COMMAND_HISTFILE__
XPC_FLAGS
Apple_PubSub_Socket_Render
__CF_USER_TEXT_ENCODING
DISPLAY
ZDOTDIR
PATH
TERM
SSH_AUTH_SOCK
SHLVL
PWD
OLDPWD
ZSH
PAGER
LESS
LSCOLORS
LC_CTYPE
EDITOR
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
VIRTUAL_ENV
PS1
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9 (1 by maintainers)
Top GitHub Comments
@matteius The issue is still present for me. Pipenv version
2022.1.8
.@elanou Please provide additional details on how to reproduce if this is still happening with
pipenv=2022.7.4
Perhaps even open a new issue about it with those details.