Python Forum

Full Version: installing third-party modules
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What I'm using:
Windows 10
Python 3.8 32-bit

Complete and utter Python Noob here, with zero coding experience. Hello! I'm following along with the "Automate The Boring Stuff" tutorial (which seems well-known) on YouTube. Things were fine until we got to installing third-party modules...I've come to a screeching halt.

Tutorial says to first install the module "pyperclip" using pip. I am told to type the following in the command prompt:

 pip install pyperclip 
when I do that, command prompt returns the following:

'pip' is not recognized as an internal or external command, operable program or batch file.
I've tried searching for a solution, including on threads here, but solutions vary and are often beyond my current level of comprehension, and/or don't quite address the issue I'm having. It's really frustrating. The two camps seem to be either A.) you ACTUALLY need to type a ton of other stuff in the command prompt that was left out of the tutorial for no apparent reason (and what you're supposed to type seems to change depending on the source), or B.)you need to uninstall and reinstall Python and hit a checkbox or two to ensure pip is where you need it (although I believe Python's website says pip is automatically included, so why would they make it difficult to access??).

Does someone have an explanation of why I am getting the response I'm getting in the command prompt?

Thanks.


Here's a link to automate the boring stuff index on importing 3rd party modules: http://automatetheboringstuff.com/appendixa/
Try to avoid installing via pip outside the virtual environment.
python -m venv <you_venv_name>
# then activate your venv
<your_venv_name>\Scripts\activate.bat
# now you can use pip safely
pip install <name>
try pip3
and, just in case, you are using pip from command line, correct?
Look at Python 3.8 (3.6-3.7) and pip installation under Windows.
shabux Wrote:'pip' is not recognized as an internal or external command, operable program or batch file.
In link over look at Fixing Path if needed,this is when have installed and get a message like this.
(Apr-07-2020, 09:04 AM)Mateusz Wrote: [ -> ]Try to avoid installing via pip outside the virtual environment.
python -m venv <you_venv_name>
# then activate your venv
<your_venv_name>\Scripts\activate.bat
# now you can use pip safely
pip install <name>

Virtual environment = IDLE, or a python file?

By "avoid" are you implying that installing via pip outside the virtual environment is bad? Either way, I'd rather follow along with what the tutorial is doing, unless there's a convincing argument for doing otherwise.

I don't know what your using in your example, or what you're typing, as I am a noob per my post.

(Apr-07-2020, 10:31 AM)snippsat Wrote: [ -> ]Look at Python 3.8 (3.6-3.7) and pip installation under Windows.
shabux Wrote:'pip' is not recognized as an internal or external command, operable program or batch file.
In link over look at Fixing Path if needed,this is when have installed and get a message like this.

I uninstalled and re-installed Python, using the link you provided, and was able to successfully install pyperclip in the command prompt! Thanks!!

I got a warning that I am "using pip version 19.2.3, however version 20.0.2 is available." It says I can "upgrade via the 'python -m install --upgrade pip' command". So, should I just type the following into the command prompt:

python -m install --upgrade pip
Thanks for your help.

(Apr-12-2020, 08:13 PM)shabux Wrote: [ -> ]
(Apr-07-2020, 09:04 AM)Mateusz Wrote: [ -> ]Try to avoid installing via pip outside the virtual environment.
python -m venv <you_venv_name>
# then activate your venv
<your_venv_name>\Scripts\activate.bat
# now you can use pip safely
pip install <name>

Virtual environment = IDLE, or a python file?

By "avoid" are you implying that installing via pip outside the virtual environment is bad? Either way, I'd rather follow along with what the tutorial is doing, unless there's a convincing argument for doing otherwise.

I don't know what your using in your example, or what you're typing, as I am a noob per my post.

(Apr-07-2020, 10:31 AM)snippsat Wrote: [ -> ]Look at Python 3.8 (3.6-3.7) and pip installation under Windows.
In link over look at Fixing Path if needed,this is when have installed and get a message like this.

I uninstalled and re-installed Python, using the link you provided, and was able to successfully install pyperclip in the command prompt! Thanks!!

I got a warning that I am "using pip version 19.2.3, however version 20.0.2 is available." It says I can "upgrade via the 'python -m install --upgrade pip' command". So, should I just type the following into the command prompt:

python -m install --upgrade pip
Thanks for your help.

I just went ahead and upgraded in the cdm and it worked. Last question on this thread: Do I need to re-install the pyperclip module now in the cdm (since I upgraded pip), or do I not have to re-install the pyperclip module?
Quote:p module now in the cdm (since I upgraded pip), or do I not have to re-install the pyperclip module?
It never hurts to try. Pip will not re-install if module is up to date.