-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fresh creation of pipenv creates and fails immediately in Windows #5978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The However, the bat file is in bin directory itself
|
Did some more digging, realised pipenv creates virtual by running the It was a but difficult to identify the source code that actually creates the files, but I saw one of the tests It checks only if Let me know if this should be a virtualenv issue or pipenv |
Just wondering, and its different from your virtualenv question, I'd have to dig more in that, but does this update to pythonfinder solve what you are seeing: #5986 |
@matteius I am not sure, I dont see any references to updating |
Well from my perspective, I use pipenv in windows all the time -- I recall such a similar issue in the past but I thought it was solved by upgrading virtualenv and re-creating old virtualenvs. The new version has been published to pypi so you can upgrade pipenv as well. |
I still face the issue with latest versions of pipenv.
|
@gigatesseract, thank you for the RCA! This issue only seems to occur with mingw-w64-x86_64-python, not the base python package.
This is a blocker for me at the moment, so I'll see if I can come up with a patch quickly. For context: This issue likely stems from MSYS2 (Cygwin/MinGW) incompatibility. Pre-built packages are available in multiple flavors, compiled against GCC/MinGW utilizing Microsoft Visual C++ Runtime (MSVCRT), GCC/MinGW utilizing Microsoft Universal C Runtime (UCRT), and Clang/LLVM (of which I don't know the backend library being used, as I don't use it myself). They can behave quite differently under the same circumstances. @matteius, might it make sense to rename this issue as to be specific to MSYS2 instead of Windows in general? |
Have you tried the main branch yet as we merged the pythonfinder 3.0.0 PR late last night that has a lot of windows improvements. Would be worth checking please. |
@matteius Wow. Thank you for the quick reply! The msys2 pacman build of Sadly, the update did not help. Just to be sure, the version has not been bumped on the main branch yet, right? When installing, I still receive $> python -m venv .hidden-venv
$> .hidden-venv/bin/pip install -v git+https://github.com/pypa/pipenv.git@main 2>&1 | tee pip-install.txt
...
$> mkdir .venv
$> .hidden-venv/bin/pipenv install 2>&1 | tee pipenv-install.txt
... |
Yeah the version identifier in main doesn't get the -dev anymore due to some complication we ran into in the post commit actions of the publish CI, so that means your issue likely isn't solved. I will try to look more deeply into the report in the near future. |
Alright, thanks! I'll dig into this as well, hopefully coming up with a patch in the next few days. I'll get back once I have some new insight. |
Reutilizing the mechanism of virtualenv determining the path of the scripts/ directory. This allows for determining the scripts/ path without requiring logic dependent on platform identifiers and mitigates issues when being executed from within Cygwin/MinGW environments, as they provide a POSIX(-ish) interface therefore resulting in non-native Windows environment behavior. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
@matteius, I've drafted a proposal for refactoring the path lookup. Basically, since MinGW's goal is to emulate a POSIX environment as best as possible, Please let me know what you think. If you concur, i'd then also refactor |
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Reutilizing the mechanism of virtualenv determining the path of the scripts/ directory. This allows for determining the scripts/ path without requiring logic dependent on platform identifiers and mitigates issues when being executed from within Cygwin/MinGW environments, as they provide a POSIX(-ish) interface therefore resulting in non-native Windows environment behavior. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Reutilizing the mechanism of sysconfig install (path) schemes for determining the path of the scripts/ directory. This allows for determining the scripts/ path without requiring logic dependent on platform identifiers and mitigates issues when being executed from within Cygwin/MinGW environments, as they provide a POSIX(-ish) interface therefore resulting in non-native Windows environment behavior. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Removed custom logic for determining the scripts/ location, in favor of using the virtualenv mechanism. Fixes: pypa#5978
Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
Issue description
Unable to create a virtualenv using pipenv
Expected result
To create a virtualenv successfully
Actual result
RuntimeError
Steps to replicate
$ pipenv --support
Pipenv version:
'2023.10.3'
Pipenv location:
'C:/msys64/mingw64/lib/python3.10/site-packages/pipenv'
Python location:
'C:/msys64/mingw64/bin/python3.exe'
OS Name:
'nt'
User pip version:
'23.2.1'
user Python installations found:
PEP 508 Information:
System environment variables:
ACLOCAL_PATH
ALLUSERSPROFILE
APPDATA
ASL.LOG
CHROME_CRASHPAD_PIPE_NAME
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
CONFIG_SITE
DISPLAY
DRIVERDATA
EFC_8620
EXEPATH
HOME
HOMEDRIVE
HOMEPATH
HOSTNAME
INFOPATH
LC_CTYPE
LOCALAPPDATA
LOGONSERVER
MANPATH
MINGW_CHOST
MINGW_PACKAGE_PREFIX
MINGW_PREFIX
MOZ_CRASHREPORTER_DATA_DIRECTORY
MOZ_CRASHREPORTER_EVENTS_DIRECTORY
MOZ_CRASHREPORTER_PING_DIRECTORY
MOZ_CRASHREPORTER_RESTART_ARG_0
MOZ_CRASHREPORTER_STRINGS_OVERRIDE
MSYS
MSYSTEM
MSYSTEM_CARCH
MSYSTEM_CHOST
MSYSTEM_PREFIX
NUMBER_OF_PROCESSORS
OLDPWD
ONEDRIVE
ONEDRIVECONSUMER
ORIGINAL_PATH
ORIGINAL_TEMP
ORIGINAL_TMP
ORIGINAL_XDG_CURRENT_DESKTOP
OS
PATH
PATHEXT
PKG_CONFIG_PATH
PKG_CONFIG_SYSTEM_INCLUDE_PATH
PKG_CONFIG_SYSTEM_LIBRARY_PATH
PLINK_PROTOCOL
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PSMODULEPATH
PUBLIC
PWD
SESSIONNAME
SHELL
SHIM_MCCOMPAT
SHLVL
SSH_ASKPASS
SYSTEMDRIVE
SYSTEMROOT
TEMP
TERM
TERM_PROGRAM
TERM_PROGRAM_VERSION
TMP
TMPDIR
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
WINDIR
ZES_ENABLE_SYSMAN
_
__PSLOCKDOWNPOLICY
LANG
COLORTERM
GIT_ASKPASS
VSCODE_GIT_ASKPASS_NODE
VSCODE_GIT_ASKPASS_EXTRA_ARGS
VSCODE_GIT_ASKPASS_MAIN
VSCODE_GIT_IPC_HANDLE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv?specific environment variables:
Debug?specific environment variables:
PATH
:C:\Users\nprav\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\nprav\bin;C:\Program Files\Mozilla Firefox;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\msys64\mingw64\bin;C:\Ruby31-x64\bin;C:\Users\nprav\AppData\Local\Microsoft\WindowsApps;C:\Users\nprav\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl;C:\msys64\mingw64\bin\
SHELL
:C:\Program Files\Git\usr\bin\bash.exe
LANG
:en_US.UTF-8
PWD
:C:/Users/nprav/hacktoberfest/first-contributions
The text was updated successfully, but these errors were encountered: