简体   繁体   中英

Does this means the python path for pip install is incorrect? If so, how do I know the right path and then how do I change that?

I am trying to pip install Jupyter but powershell is giving me this error:

C:\Users\me> pip install jupyter
pip : The term 'pip' 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
+ pip install jupyter
+ ~~~
    + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I have tried reading other questions on here about fixing paths, but those solutions did not work correctly for me even after re-booting powershell and my system. Also, I performed both a system update and re-installed python. None of that worked.

I've found that if python is not on your path then pip doesn't work. Run the command below to see what you have on your path.

PS> ($env:PATH).split(';')

If you don't see python on the path then add it like I have below (assuming your python install is in a directory named python in c:\\ .

PS> $env:PATH = "$($env:PATH);C:\\python"

Try running pip in the same PowerShell console as the previous two commands. If it works, then you'll need to add c:\\python to your PATH permanently.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM