0

For a very long time I've used python to code. I installed Anaconda and I use Visual Studio Code to write the code. I want to download a new package using pip, and following the "Installing packages" from the python documentation I first checked if I had python in the system by typing "python --version" on Windows PowerShell. I assumed that I had python, but I get the following error message:

enter image description here

Do I have to install Python directly from python.org even though I have it on Anaconda?

2 Answers 2

2

I fixed it! Miraculously I added a directory to the line, so it looked like this:

enter image description here

Don't ask me the odds of success for stitching a directory and a line off the internet because I can barely comprehend it myself.

0

I think your Python location is missing from $Env:Path. try:

echo $Env:Path

and check if the directory is in that list. Most likely not. then you will have to add it to the path variable.

$Env:Path += ";C:\Users\EspenOliver\Anaconda3\python"
refreshenv
2
  • Ok, I've done this and I can now find python in the list when I type echo $Env:Path. But if I now type python --version it returns the same error as before. Jul 5, 2019 at 11:48
  • @EspenSales Does python3 --versoin work?
    – NFR
    Jul 6, 2019 at 1:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .