Reputation: 1916
I am struggling with achieving the right settings for PATH and PYTHONPATH.
My main objective is to update pip via Command Prompt, via
python -m pip install --upgrade pip
while in the prompt C:\Users\John Doe>
This results in
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
As an aside, I can successfully run
pip install <xxxx>
'pip.exe' is located in C:\ProgramData\Anaconda3\Scripts and 'python.exe' is located in C:\ProgramData\Anaconda3\
My environment variables currently look like
User variables for John Doe:
Path C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts
PYTHONPATH: C:\ProgramData\Anaconda3
System variables:
PYTHONPATH: C:\ProgramData\Anaconda3
(I didn't add this folder to the 'Path' under System variables)
any help appreciated!
Upvotes: 1
Views: 172
Reputation: 5407
Its Windows' fault. For some unfathomable reason, there is a default python.exe
that does nothing except redirect to the Windows Store. To fix this, go to Settings -> Manage App Execution Aliases
and disable python.exe
and python3.exe
.
Upvotes: 1