pipenv shell malforms PATH on git bash for windows
See original GitHub issueOn git bash for windows, pipenv shell
results in command not found for most commands (python
, git
, ls
, which
, etc)
<Note: I know that python -V says 3.6.3
and the path says 3.6.0
; I did an upgrade and never bothered to rename the directory>
Interestingly, in the windows command prompt pipenv shell
works as expected.
I think the problem is in the PATH. Here’s the path before and after pipenv shell
Grunzkes@Pantheon MINGW64 /c/dev/charmspace/iq-api (master)
$ echo $PATH$
/c/Users/Grunzkes/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/Grunzkes/bin:/c/ProgramData/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/apps/python/3.6.0:/c/apps/python/3.6.0/scripts:/c/apps/nodejs/v7.9.0:/c/apps/Yarn/bin:/c/Program Files/gs/gs9.21/bin:/c/Program Files/gs/gs9.21/lib:/c/Users/Grunzkes/AppData/Local/Microsoft/WindowsApps:/c/apps/vs-code/bin:/c/Users/Grunzkes/AppData/Roaming/npm:/c/Users/Grunzkes/AppData/Local/Yarn/bin:/usr/bin/vendor_perl:/usr/bin/core_perl$
Grunzkes@Pantheon MINGW64 /c/dev/charmspace/iq-api (master)
$ pipenv shell
Grunzkes@Pantheon MINGW64 C:/dev/charmspace/iq-api
$ echo $PATH$
C:\Users\Grunzkes\.virtualenvs\iq-api-rSM3q15e\Scripts;C:\Users\Grunzkes\bin;C:\apps\Git\mingw64\bin;C:\apps\Git\usr\local\bin;C:\apps\Git\usr\bin;C:\apps\Git\usr\bin;C:\apps\Git\mingw64\bin;C:\apps\Git\usr\bin;C:\Users\Grunzkes\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\apps\python\3.6.0;C:\apps\python\3.6.0\scripts;C:\apps\nodejs\v7.9.0;C:\apps\Yarn\bin;C:\Program Files\gs\gs9.21\bin;C:\Program Files\gs\gs9.21\lib;C:\Users\Grunzkes\AppData\Local\Microsoft\WindowsApps;C:\apps\vs-code\bin;C:\Users\Grunzkes\AppData\Roaming\npm;C:\Users\Grunzkes\AppData\Local\Yarn\bin;C:\apps\Git\usr\bin\vendor_perl;C:\apps\Git\usr\bin\core_perl$
It appears that the path is being created in a windows format despite being in a bash shell. I say that based on:
- The separator changes from
:
to;
(Unix to Windows) - The paths change from
/c/
toC:\
Is there a flag or config to force unix-style PATH in pipenv shell
?
Environment
- Windows 10
- Python 3.6.3
- pipenv, version 8.2.7
- git version 2.11.0.windows.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
pipenv install/pipenv shell not working with Git Bash on ...
My software versions are: Windows 10 Home 21H1; git version 2.35.1; bash version 4.4.23; Python 3.10.2. Update: So I feel ...
Read more >pipenv Documentation - Read the Docs
Running Pipenv as root or with sudo (or Admin on Windows) is highly ... Added support for pipenv shell on msys and cygwin/mingw/git...
Read more >pipenv Documentation
Fixed a bug with the discovery of python paths on Windows which could ... for pipenv shell on msys and cygwin/mingw/git bash for...
Read more >Install Pipenv on Windows via Windows Powershell or Gitbash
After I installed Python 3 via Gitbash, I also used Windows ... Windows Powershell it asked me to check whether the path is...
Read more >History | Poetry - Python dependency management and ...
Path dependency metadata is unconditionally re-locked (#6843). ... Fix an issue where poetry shell was broken in git bash on Windows (#6560).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@erinxocon I would argue that git for windows, and mingwin are actually commonly used for terminal shells in Windows (especially for all of us coming from *nix/mac), and lacking support for it is a real problem.
I also faced similar issue on my GIT bash shell (version 2.7.3). Updating the shell to latest version did not help. What finally worked for me was manually editing the $PATH variable. Here’s what i did:
This worked for me.