Add directory to Python path in PyCharm?

user32882 picture user32882 · Feb 23, 2018 · Viewed 47k times · Source

I want to be able to use the paraview.simple library in PyCharm. I already have paraview installed in my computer. This package cannot be installed with pip and there are no .whl files as far as I can tell. The website docs recommend that the directory containing all the python files be added to PYTHONPATH.

How do I add the relevant folder in PYTHONPATH on my PyCharm session, and keep it there by default, such that when I close out and reopen the paraview.simple library is still available?

Answer

FlyingTeller picture FlyingTeller · Feb 23, 2018

You can add custom paths this way.

  • Go to File->Settings->project Interpreter
  • In the Project-Interpreter field, click the down facing arrow and select "show All"
  • In that Menu, highlight your interpreter and then in the right menu, select the button "Show paths for the selected interpreter" (this is the last button)
  • click the plus symbol to add your path