pycharm: indexing installed package instead of sources root

127 views Asked by At

I cloned a github repository of a package, MDAnalysis, which I also have installed under /usr/local/lib/python3.5/dist-packages/MDAnalysis.

I opened the cloned repository in PyCharm and set it as source root, like in the picture below:

MDAnalysis as source root

My problem: when I try to navigate to any submodule of MDAnalysis, PyCharm takes me to the submodule under the version that I have installed, instead of the submodule of the cloned repository.

Maybe I could fix this if I placed the source root first in the PYTHONPATH variable, but I don't know how to do this in the PyCharm environment.

1

There are 1 answers

0
jmborr On BEST ANSWER

It turns all I needed was to mark package as sources instead of MDAnalysis, and then clean the caches and restart.