ModuleNotFound error when using PIP in pycharm venv

29 views Asked by At

I keep on getting an error when trying to use pip in my virtual environment in pycharm. Every time I try and install a package using pip it comes back with a ModuleNotFoundError.

enter image description here

Ubuntu 22.04.4 LTS Pycharm Python3.9 Interpreter

Have tried from pycharm terminal and also package manager but they both have the same error.

1

There are 1 answers

0
Vinay Davda On

As 9769953 commented, you can use:

python3 -m pip install <package>

Also you can check which pip you are using when you use command line install. (Execute below in shell)

which pip

It will give path of pip which will be used when you try pip install < package > and it should match same path with your python interpreter:

which python

>> Image: Virtual environment python interpreter

>> Image: Default python interpreter