1

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!

2
  • where python.exe prints C:\Users\John Doe\AppData\Local\Microsoft\WindowsApps\python.exe C:\ProgramData\Anaconda3\python.exe Commented Feb 25, 2021 at 1:39
  • What's your question Commented Feb 25, 2021 at 1:40

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.