0

I'm using PyCharm and also installing dependencies with pip I dont know how to make PyCharm to get this new dependencies that I install and are in the folder {project_base}/env/lib/python3.9

If I go there I can see the libraries installed, but PyCharm is not able to seen it, and allow me to use it in the code.

I've seen in the preference the Python Interpreter section, but I need to use pip, since I'm documenting the package to install with pip for other users.

Any idea how to point my PyCharm to my env/lib/ folder?

Regards

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
paul
  • 12,873
  • 23
  • 91
  • 153
  • Choose the venv as an interpreter and the libraries will be available to use. – bad_coder Jul 01 '21 at 08:59
  • Wrongly closed as duplicate, because the author specifically asks about the relationship between pip and PyCharm. Please do not be so trigger happy with your vote to close finger. – Mikko Ohtamaa Jul 01 '21 at 09:06

1 Answers1

1

When you choose Python Interpreter, PyCharm will automatically pick up libraries available on that Python installation.

Make sure PyCharm uses the Python Interpreter that has its libraries installed in env/lib/python3.9 and then you should see available libraries on the interpreter configuration screen.

If you install libraries with pip e.g. env/bin/python -m pip install mylib they will become automatically available to PyCharm, because PyCharm and pip will use the same Python installation to manage these libraries.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435