-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Be sure to check the existing issues (both open and closed!).
The virtualev created by pipenv includes a copy of the python executable rather than a symlink. This means that I'll end up running out-of-date copies of the python interpreter, which will not include security updates; and since the virtualenv does include symlinks to the standard library, the two will diverge and I'll end up with an unsupported combination of old python interpreter and newer standard library.
$ python -m pipenv.help output
Pipenv version: '11.10.1'
Pipenv location: '/home/sam/.local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python3'
Other Python installations in PATH:
-
2.7:/usr/bin/python2.7 -
2.7:/usr/bin/python2.7 -
3.6:/usr/bin/python3.6m -
3.6:/usr/bin/python3.6 -
2.7.15:/usr/bin/python -
2.7.15:/usr/bin/python2 -
3.6.5:/usr/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5c1',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.15.0-3-amd64',
'platform_system': 'Linux',
'platform_version': '#1 SMP Debian 4.15.17-1 (2018-04-19)',
'python_full_version': '3.6.5rc1',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
LS_COLORSLESSCLOSEXDG_MENU_PREFIXLANGGDM_LANGMALLOC_PERTURB_DISPLAYEDITORCOLORTERMDESKTOP_AUTOSTART_IDUSERNAMEXDG_VTNRSSH_AUTH_SOCKS_COLORSLESS_TERMCAP_soLESS_TERMCAP_seXDG_SESSION_IDUSERDESKTOP_SESSIONGNOME_TERMINAL_SCREENPWDHOMESSH_AGENT_PIDQT_ACCESSIBILITYXDG_SESSION_TYPEhttps_proxyXDG_DATA_DIRShttp_proxyXDG_SESSION_DESKTOPLESS_TERMCAP_mbLESS_TERMCAP_mdLESS_TERMCAP_meENV_TEST_SAMno_proxyANSIBLE_NOCOWSGTK_MODULESNO_PROXYVISUALWINDOWPATHTERMSHELLVTE_VERSIONDEBNAMEXDG_CURRENT_DESKTOPGPG_AGENT_INFOGNOME_TERMINAL_SERVICEPYTHONSTARTUPCOLORFGBGSHLVLXDG_SEATDEBEMAILGDMSESSIONGNOME_DESKTOP_SESSION_IDLOGNAMEDBUS_SESSION_BUS_ADDRESSXDG_RUNTIME_DIRXAUTHORITYLESS_TERMCAP_ueLESS_TERMCAP_usANSIBLE_COW_SELECTIONPATHSESSION_MANAGERLESSOPEN_OLDPWDPYTHONDONTWRITEBYTECODEPIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH:/home/sam/bin:/home/sam/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesSHELL:/bin/bashEDITOR:vimLANG:en_GB.UTF-8PWD:/home/sam/src/nexsan-exporter/nexsan-exporter
Expected result
A venv that uses symlinks as created by the standard python python3 -m venv /tmp/foo:
$ ls -l /tmp/foo/bin/python*
lrwxrwxrwx 1 sam sam 7 May 1 10:44 /tmp/foo/bin/python -> python3
lrwxrwxrwx 1 sam sam 16 May 1 10:44 /tmp/foo/bin/python3 -> /usr/bin/python3
Actual result
A venv that includes a copy of the python executable:
$ ls -l ~/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python*
lrwxrwxrwx 1 sam sam 7 May 1 10:46 /home/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python -> python3
-rwxr-xr-x 1 sam sam 4576440 May 1 10:46 /home/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python3
lrwxrwxrwx 1 sam sam 7 May 1 10:46 /home/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python3.6 -> python3
-rwxr-xr-x 1 sam sam 2377 May 1 10:46 /home/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python-config
Steps to replicate
$ python3 -m pipenv install --verbose
Creating a virtualenv for this project…
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/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python3
Also creating executable in /home/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/sam/.local/share/virtualenvs/nexsan-exporter-1-atX-z8
Creating a Pipfile for this project…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Using pip: -i https://pypi.org/simple
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
Using pip: -i https://pypi.org/simple
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Updated Pipfile.lock (ca72e7)!
Installing dependencies from Pipfile.lock (ca72e7)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run the following:
$ pipenv shell