I can’t install a package with the pip or pip3 command and I can’t install it from the Python Interpreter in PyCharm too. I can’t tap on the ‘+’ at the Python Interpreter in PyCharm.
I get this error:
pip command not found
I can’t install a package with the pip or pip3 command and I can’t install it from the Python Interpreter in PyCharm too. I can’t tap on the ‘+’ at the Python Interpreter in PyCharm.
I get this error:
pip command not found
3
Answers
3 commands
or maybe
Here is what you can try.
If you get the version as 3.x, then we are good, else goto your python installation directory and copy its path and then add it to your environment variable PATH.
if above didn’t work then add pip path to PATH environment variable which would be something similar to above output.
Just do
pip install package-name
for testing, you can try:
pip install numpy
If it still throws error, try below one
python -m pip install numpy
if it still throws error, then you might need to clean your python installation.
It looks like you don’t have
pip
installed on$PATH
. The following command will runpip
without any adjustments to$PATH
:Pay attention to the
-m
, this stands for modules and runs thepip
program inside thepython3
interpreter (I don’t know exact definition here, if anyone wishes to correct me I will update the answer)However, if this doesn’t work then you may not have
pip
installed, and can be installed by running:Then, reload your shell via the following (replace
bash
with your shell):Running
pip --version
should now work