Pipenv install puts packages into main Python site-packages #3006
Labels
Type: Bug 🐛
This issue is a bug.
Type: Regression
This issue is a regression of a previous behavior.
Issue description
On Windows 10 in the standard cmd-shell, after activating
pipenv shell
from my project directory and then executing from within that shell:all the packages from the Pipfile where installed into the
site-packages
directory of my main Python installation, instead of the virtualenv from pipenv. This happened three times now, so it doesn't seem to be an isolated incident.Note: The
pipenv shell
ran correctly, I believe, because my prompt was prefixed with(myproject-abcd...
) afterwards.Expected result
The packages from pipfile/pipfile.lock should be installed into the pipenv-managed virtualenv and the
site-packages
directory there, not the global/main Python installation.Actual result
Instead, all the packages ended up in my main
Python37\Lib\site-packages
directory.Steps to replicate
Steps that I executed with a brand-new Python-3.7 (64bit) installation on Windows (I had to uninstall and re-install it, after the previous site-packages was messed up from the pipenv command), with pipenv already installed via
pip install --user pipenv
.pipenv shell
(from within the project directory, where at some point previously a virtual environment had already been created withpipenv --python 3.7
. It looks like the virtual environment got activated correctly, because the shell had the prompt with the prefix(ktapi-ECP2Oyww)
(ktapi was the project name).pipenv install
(from within that virtual environment).$ pipenv --support
Pipenv version:
'2018.10.9'
Pipenv location:
'C:\\Users\\Martin\\AppData\\Roaming\\Python\\Python37\\site-packages\\pipenv'
Python location:
'c:\\tools\\python37-64\\python.exe'
Python installations found:
3.7.0
:C:\tools\Python37-64\python.exe
3.6.4
:C:\tools\Python36-64\python.exe
PEP 508 Information:
System environment variables:
ALLUSERSPROFILE
ANT_HOME
APPDATA
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
CONFIGSETROOT
DRIVERDATA
HOMEDRIVE
HOMEPATH
JAVA_HOME
LOCALAPPDATA
LOGONSERVER
NUMBER_OF_PROCESSORS
ONEDRIVE
OS
PATH
PATHEXT
PIPENV_ACTIVE
PIP_PYTHON_PATH
PIP_SHIMS_BASE_MODULE
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PROMPT
PSMODULEPATH
PUBLIC
PYTHONDONTWRITEBYTECODE
SESSIONNAME
SYSTEMDRIVE
SYSTEMROOT
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
VIRTUAL_ENV
WINDIR
Pipenvûspecific environment variables:
PIPENV_ACTIVE
:1
Debugûspecific environment variables:
PATH
:C:\Users\Martin\.virtualenvs\ktapi-ECP2Oyww\Scripts;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\tools\Python37-64\Scripts\;C:\tools\Python37-64\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Pandoc\;C:\tools\PostgreSQL\pg10\bin;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Users\Martin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\Martin\AppData\Roaming\npm;C:\Program Files\Heroku\bin;C:\tools\apache-ant-1.10.3\bin;C:\Program Files\Salesforce CLI\bin;C:\Users\Martin\AppData\Roaming\Python\Python37\Scripts;C:\Users\Martin\AppData\Local\Programs\Microsoft VS Code\bin
VIRTUAL_ENV
:C:\Users\Martin\.virtualenvs\ktapi-ECP2Oyww
Contents of
Pipfile
('C:\Users\Martin\Documents\repositories\ktapi\Pipfile'):Contents of
Pipfile.lock
('C:\Users\Martin\Documents\repositories\ktapi\Pipfile.lock'):The text was updated successfully, but these errors were encountered: