jb4
jb4

Reputation: 1

The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. - VSCode Python

Whenever I ty to install matplotlib or any other python library using pip install in the terminal, I get this message:

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

I have tried to fix it using tutorials online such as this one: https://www.youtube.com/watch?v=pUxiQ5bMVh0&ab_channel=TheCodeCity , but nothing works still in VsCode. If I run pip in my cmd it outputs and shows me the whole pip library with its commands and prompts like it should if installed correctly, but still doesn't work within VSCode. Any help would be greatly appreciated as this is important for allowing me to finish a school project due in the very near future. This is not an issue I have ever ran into before on any device, such as my laptop (which is unable to run such a project efficiently) or on a school computer, which is where I began coding the project before attempting to continue it on my PC at home.

Upvotes: 0

Views: 104

Answers (1)

JRiggles
JRiggles

Reputation: 6810

You may need to set up a Python interpreter in VS Code if you haven't already (that is, you need to tell VS Code which Python to use by default).

Open VS Code, then open the Command Palette with Ctrl-Shift-P and search for "Python: Select Interpreter", then hit Enter

This should bring up a list of Python interpreters that you've installed on your machine. Just select the one marked "Recommended" and you should be good to go.

You may also need/want to install the Python and Pylance VS Code extensions.

Upvotes: 0

Related Questions