Skip to content Skip to sidebar Skip to footer

Python Module Install With Pip

I used to inuput the command pip3 install module_name to install any module and it was working. But suddenly I have the following error when I try to install something. Traceback (

Solution 1:

You want to use python -m pip install <module> because the python command will leverage a specific interpreter. However, pip by itself could point to any number of pip binaries, which could point to unknown interpreters. So, best thing to do is to specify the interpreter.

Specifically, the -m flag says "I want to call a module from the python I have specified." pip is not the only module you can do this with:

python -m timeit
python -m zipfile
python -m pip

You can check where pip is pointing by using the -V flag:

python -m pip -V
pip 19.2.2 from /Users/mm92400/anaconda3/lib/python3.6/site-packages/pip (python 3.6)

Post a Comment for "Python Module Install With Pip"