-
Notifications
You must be signed in to change notification settings - Fork 418
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
Pipx cannot be install on windows #659
Comments
Just to make sure you've seen this: If you've added these paths to your system PATH, then you may need to restart your shell, or possibly logout and login. Often new additions to the PATH are not immediately available in a running shell. If you use As for producing an error message, there's nothing that pipx can do here. The shell hasn't found pipx in your example, so our code is not actually running, and therefore we can't produce an error message... 🤷 |
I added the path, and it seems that is still an issue, I don't know what else to do. I made it work inside of WSL within Ubuntu, but I'm not sure what else I have to do for Windows. |
It's hard to troubleshoot without more information, but here are some things you can check: It seems like you're using Windows Powershell for your original bug report. If so, then the following examples should apply. First see what your PATH is set to. Execute
and check that the paths you intended to add to the system PATH actually show up in that list. If they don't, then the method isn't working to modify your PATH. Another thing to check is that the
Finally, you can actually try to use the full path to run pipx and see if it works. From your user home directory, execute:
|
I think I had the same issue. I noticed that %USERPROFILE%.local\bin had been added to the Path variable of USERPROFILE. I added it to Path variable for System variables too and pipx started working. |
I had a similar issue, with cmd. What I did was search for pipx.exe, then I dragged it into my cmd and ensurepath. Once I did that my problem was still not resolved. I even opened in powershell and it said the same thing. Seems like the bug is in the ensurepath function. It's not setting the path correctly as user itsayellow thought. Things to note: My python 3.8 is from windows store. I'm wondering if that is the issue. Python stores in a different folder when from the windows store. Not sure if thats something pipx devs have worked around in their ensurepath code. Anyways, on to manually setting the path with https://www.computerhope.com/issues/ch000549.htm#windows10 Edit: It worked! |
What's actually happening here is that So the actual fix would be to have This removes the need to logout or reboot that some users have observed, e.g., #589. |
We just tested this on Windows 10 with pipx 0.16.4 and saw a similar behavior as described above:
|
Make sure to check that the CORRECT Path is added. Because for me ensure path did add the paths BUT........... the paths were technically incorrect, meaning that the path had lowercase characters, like instead of C:/Users/Name..... ensure path added, c:/users/name..... so once i changed it, it worked absolutely fine. |
I thought that Windows is case-insensitive with respect to paths... 🤔 |
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 As well as the link I gave earlier, there's a ton of discussion and detail on this mechanism in microsoft/terminal#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: ofek/userpath#40 |
And 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: C:\Users\paulh
>pipx
pipx: The term 'pipx' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
C:\Users\paulh
>py -3 -m pipx ensurepath
Success! Added C:\Users\paulh\.local\bin to the PATH environment variable.
Success! Added C:\Users\paulh\AppData\Roaming\Python\Python39\Scripts to the PATH environment variable.
Consider adding shell completions for pipx. Run 'pipx completions' for instructions.
You will need to open a new terminal or re-login for the PATH changes to take effect.
Otherwise pipx is ready to go! ✨ 🌟 ✨ and doing nothing else, I opened a new cmd.exe session from the Start Menu and: Microsoft Windows [Version 10.0.19042.1466]
(c) Microsoft Corporation. All rights reserved.
C:\Users\paulh>pipx
usage: pipx [-h] [--version]
{install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,completions}
... Note that a new tab or window from the same Windows Terminal session does not see the updated PATH, pending implementation of microsoft/terminal#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 " Note: I did the same test with opening a new Windows Terminal session, but it saw |
Hi all, thanks for looking into this issue and your work on pipx in general. I'll check it with the next install under Windows. |
|
Describe 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:
How to reproduce
Expected behavior
The text was updated successfully, but these errors were encountered: