Installing Python packages through pip?

Viewed 1125

I am trying to install the python package pyperclip.

I've been trying to do this for a while now, but it's simply not working. Here is what I've tried (from other answers on the internet):

  • Opened Windows Powershell, changed the directory to where I installed Python. The location of the file is below: C:\Users\Jamie\AppData\Local\Programs\Python\Python37\Scripts

  • Entered the command pip install pyperclip. I get the following error 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. I also get the following suggestion from Powershell: Suggestion [3,General]: The command pip was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\pip". See "get-help about_Command_Precedence" for more details.

  • Entered the command python -m pip install pyperclip. Here, nothing happens. I get no error message but I still can't import the package in Python IDLE.

I don't know what else to do? Any help is appreciated.

SOLVED: I ran the same command on cmd instead of PowerShell and it worked. Not sure why, though.

0 Answers
Related