Pipx cannot be install on windows
See original GitHub issueDescribe the bug I’m currently trying to install pipx within my windows machine, and it seems that is not able to detect my path environmental variables because when you use the command pipx list is not able to recognized pipx. If I do pip list, I would be able to see that pipx is part of the list.
This is the error that I’m getting:
pipx : The term 'pipx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pipx list
+ ~~~~
+ CategoryInfo : ObjectNotFound: (pipx:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
How to reproduce
- Open your terminal
- Run the following command
python3 -m pip install --user pipx
- Set up your path environmental variables
%USERPROFILE%\.local\bin
%USERPROFILE%\AppData\Roaming\Python\Python38\Scripts
Expected behavior
- We should be able to have an error message that can tell us a little bit more of what could be the next step and what could resolve this situation. Also, inside of your documentation, you don’t have a lot of information about getting issues with the installation.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Installation - pipx
Consult pip's installation instructions. Installing on Linux works best with a Linux Package Manager. pipx works on macOS, linux, and Windows. Install pipx....
Read more >The term 'pipx' is not recognized as the name of a cmdlet
I run py -m pipx install eth-brownie or python3 -m pipx install eth-brownie`.
Read more >The term 'pipx' is not recognized, but installed : r/vscode - Reddit
I've installed pipx with Visual Studio Code, but terminal does not recognize ... ensurepath': The system cannot find the file specified.
Read more >Pipx cannot be install on windows - Bountysource
I'm currently trying to install pipx within my windows machine, and it seems that is not able to detect my path environmental variables...
Read more >pipx - PyPI
Upgrade pipx with python3 -m pip install --user -U pipx . On Windows, install via pip (requires pip 19.0 or later). # If...
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
And
userpath
1.8.0 has added support forWM_SETTINGCHANGE
, so new installs of pipx orpip install --upgrade userpath
should pull that version of userpath.As a quick local test, I removed the two paths from my PATH via the env-var editor UI, and then, in a new Windows Terminal session:
and doing nothing else, I opened a new cmd.exe session from the Start Menu and:
Note that a new tab or window from the same Windows Terminal session does not see the updated PATH, pending implementation of https://github.com/microsoft/terminal/issues/1125, but ConEmu for example would see the updated PATH in a new tab.
I’m not sure that’s what this bug was originally opened for, but it’s nice, and should avoid the accidental-solutions of “
ensurepath
didn’t work, but then I edited the path, and it started working”…Note: I did the same test with opening a new Windows Terminal session, but it saw
pipx
even withuserpath==1.7.0
.cmd.exe
as the second process failed this same test withuserpath==1.7.0
, so I suspect Windows Terminal is getting a fresh environment block on startup, whilecmd
(and most things, I assume) relies on the environment inherited from Explorer.It is. I think what @aryannewyork saw is what I described earlier, that by going into the environment variable editor UI, making any change (to any env-var), and saving it, the
WM_SETTINGCHANGE
message is sent out and Explorer updates its copy of the env-vars and so new terminal sessions will see the new path.As well as the link I gave earlier, there’s a ton of discussion and detail on this mechanism in https://github.com/microsoft/terminal/issues/1125 as part of getting the same behaviour to work in Windows Terminal, but for new tabs, rather than restarting the whole process.
Edit: Turns out I never actually logged this as a feature-request with userpath, so I did now: https://github.com/ofek/userpath/issues/40