Home > OS >  Python isnt recognized in cmd and i cant use pip
Python isnt recognized in cmd and i cant use pip

Time:07-17

im pretty new to coding and stuff but for whatever reason, python, pip or even doing cd C:\Python38\scripts cmd will just tell me the directory isnt found or that it isnt a command, i did echo %PATH% and it is in there. (this is probably a really simple solution, im not advanced with stuff like this at all)

CodePudding user response:

Open a new CMD with the start menu

go to the location where python is installed.

press on the Path next to Search Bar.

Copy, back to CMD, cd (paste)

This will set the working directory to where python is installed.

You can test now with python command, and check it it works , then the issue is only path related.

Now for checking with Path, You will need to add the complete path to the python.exe the one you just copied into CMD.

For example

C:\Users\George\AppData\Local\Programs\Python\Python39 at this path there will be a python.exe where You can execute with CMD.

If you have an issue with the path and have to update to the new one, Make sure to start a new CMD window to take the effects of the Path update.

CodePudding user response:

You would need to add python in the PATH variable to access python from cmd in windows.

Please see the article at this link Adding python to Path

Post that you would be able to access pip from cmd/ use pip within cmd

  • Related