Pipenv uses arbitrary python installation on windows
See original GitHub issueSimilar to #4952, but happens on a clean pyenv install and while creating an environment. I’m using Python 3.10.4 installed with scoop. This happens both in cmd and in a bash shell.
Issue description
I installed pipenv using the python installation in my path, but when I run pipenv --support it only manages to find my python 2.7 installation, and an python 3.6.5 installation that came with an old julia installation, neither of which are in path. Attempting to create a new pipenv automatically uses the 3.6.5 installation.
Expected result
Pipenv uses the first python found in path
Actual result
Pipenv uses an arbitrary python installation I have no idea how it finds.
Steps to replicate
- Create a directory named “test” on the C drive
- Run
python -m pip uninstall pipenv
thenpython -m pip install pipenv
- Run
pipenv --support
C:\test>where python
C:\Users\ITR\scoop\apps\python\current\python.exe
$ pipenv --support
Pipenv version: '2022.7.24'
Pipenv location: 'C:\\Users\\ITR\\scoop\\apps\\python\\current\\lib\\site-packages\\pipenv'
Python location: 'C:\\Users\\ITR\\scoop\\apps\\python\\current\\python.exe'
Python installations found:
3.6.5
:C:\Users\ITR\.julia\conda\3\python.exe
2.7.18
:C:\Users\ITR\scoop\apps\python27\current\python.exe
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.10.4',
'os_name': 'nt',
'platform_machine': 'AMD64',
'platform_python_implementation': 'CPython',
'platform_release': '10',
'platform_system': 'Windows',
'platform_version': '10.0.19044',
'python_full_version': '3.10.4',
'python_version': '3.10',
'sys_platform': 'win32'}
System environment variables:
ALLUSERSPROFILE
ANDROID_HOME
APPDATA
BEEFPATH
BESIEGE_GAME_ASSEMBLIES
BESIEGE_UNITY_ASSEMBLIES
CGO_CFLAGS_ALLOW
CGO_CXXFLAGS_ALLOW
CGO_LDFLAGS_ALLOW
CHOCOLATEYINSTALL
CHOCOLATEYLASTPATHUPDATE
CMAKE_PREFIX_PATH
CMDER_ROOT
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
CONEMUDIR
CPATH
CUDA_PATH
CUDA_PATH_V10_1
CUDA_PATH_V10_2
DRIVERDATA
FORKGITINSTANCE
GEM_HOME
GEM_PATH
GIT_INSTALL_ROOT
GIT_SSH
GOPATH
GOROOT
GTK_BASEPATH
HOMEDRIVE
HOMEPATH
JAVA_HOME
LOCALAPPDATA
LOGONSERVER
NGINX_HOME
NODE_PATH
NUMBER_OF_PROCESSORS
NVCUDASAMPLES10_1_ROOT
NVCUDASAMPLES_ROOT
NVM_HOME
NVM_SYMLINK
NVTOOLSEXT_PATH
ONEDRIVE
OS
PATH
PATHEXT
PHP_INI_SCAN_DIR
PKG_CONFIG
PKG_CONFIG_PATH
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PROGUARD_HOME
PROMPT
PSMODULEPATH
PUBLIC
PYENV
PYENV_HOME
PYENV_ROOT
SCROLLVIEW_PATH
SESSIONNAME
STEAMROOT
SYSTEMDRIVE
SYSTEMROOT
TEMP
TESSDATA_PREFIX
TMP
U2NETHS_PATH
U2NETP_PATH
U2NET_PATH
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
VS140COMNTOOLS
WINDIR
PIP_SHIMS_BASE_MODULE
PIP_DISABLE_PIP_VERSION_CHECK
PIP_PYTHON_PATH
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
PipenvΓÇôspecific environment variables:
DebugΓÇôspecific environment variables:
PATH
:C:\Program Files\Common Files\Oracle\Java\javapath;D:\Program Files\Eclipse Adoptium\jdk-8.0.322.6-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\Go\GoPath\bin;D:\misc;D:\OpenFaceSwap;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GtkSharp\2.12\bin;D:\Program Files\Microsoft Network Monitor 3\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;D:\Go\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.5.0\;C:\cuDNN\bin;D:\Program Files\javafx-sdk-14.0.1\bin;D:\Program Files\javafx-sdk-14.0.1\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\misc\swigwin-3.0.12;D:\Program Files\Calibre2\;C:\Program Files\dotnet\;C:\Users\ITR\scoop\apps\python\current\Scripts;C:\Users\ITR\scoop\apps\python\current;C:\Users\ITR\scoop\apps\nodejs\current\bin;C:\Users\ITR\scoop\apps\nodejs\current;C:\Users\ITR\.nimble\bin;C:\Users\ITR\scoop\apps\gpg\current\bin;C:\Users\ITR\scoop\apps\adopt8-hotspot\current\bin;C:\Users\ITR\scoop\apps\perl\current\perl\site\bin;C:\Users\ITR\scoop\apps\perl\current\perl\bin;C:\Users\ITR\scoop\apps\perl\current\c\bin;C:\Users\ITR\scoop\apps\flutter\current\bin\cache\dart-sdk\bin;C:\Users\ITR\scoop\apps\ruby\current\bin;C:\Users\ITR\scoop\apps\ruby\current\gems\bin;C:\Users\ITR\scoop\apps\oraclejdk\current\bin;C:\Users\ITR\scoop\apps\gcc\current\bin;C:\Users\ITR\scoop\apps\yarn\current\Yarn\bin;C:\Users\ITR\scoop\apps\yarn\current\global\node_modules\.bin;C:\Users\ITR\scoop\apps\python27\current\scripts;C:\Users\ITR\scoop\apps\flutter\current\bin\cache\dart-sdk;C:\Python64\Scripts\;C:\Python64\;C:\Users\ITR\scoop\apps\nvm\current\nodejs\nodejs;C:\Users\ITR\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\ITR\AppData\Local\Programs\Python\Python36-32\;C:\Users\ITR\AppData\Local\Programs\Python\Launcher\;C:\Users\ITR\scoop\apps\android-sdk\current\tools\bin;C:\Users\ITR\scoop\apps\nmap\current\bin;C:\Users\ITR\scoop\apps\openjdk\current\bin;C:\Users\ITR\scoop\shims;C:\Users\ITR\scoop\apps\sdl2-msvc-x64\current\lib;D:\Program Files\RingLang\ring\bin;C:\Users\ITR\go\bin;D:\Program Files\Beef Lang\bin;C:\Users\ITR\AppData\Local\Programs\Microsoft VS Code\bin;D:\Program Files (x86)\Nmap;C:\Users\ITR\.dotnet\tools;C:\Users\ITR\.dotnet\tools;C:\Users\ITR\.dotnet\tools;D:\User\AppData\Local\Programs\Hyper\resources\bin;C:\Users\ITR\.dotnet\tools;C:\Users\ITR\.pyenv\pyenv-win\\bin;C:\Users\ITR\.pyenv\pyenv-win\\shims;C:\Users\ITR\AppData\Roaming\Python\Python310\Scripts;
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
There’s still the issue of pipenv --support only listing 2 python installations, but for installation it now works, yes. It’s possible it stored which python executable I used after I forced it to use python 3.8 (I haven’t uninstalled and reinstalled since it’s working). Same behaviour on latest pipenv version.
I can close the issue since --support not listing the correct python installations is just a minor issue, unless you want me to keep it open for it.
The newest version of pipenv is searching for python3 before python, this also helps in some cases. @ITR13 I noticed in your last reply that you said the issue kind of went away for you? Is there something actionable remaining that we should do related to this ticket?