Search code examples
pythonintellij-ideapycharm

Intellij not finding Python modules installed via pip


I have installed the nltk package via sudo pip install nltk and it works fine:

21:07:00/~ $python -c "import nltk"

Just to be sure there were no clashing with brew pip I also did:

21:06:24/~ $python -m pip install nltk
Requirement already satisfied: nltk in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: six in /usr/local/lib/python2.7/site-packages (from nltk)

So both brew and system python are happy together.

Intellij is another story. The basic python is working but the pip installed libraries are MIA:

enter image description here

Here are the relevant SDK settings:

Module level:

enter image description here

Project level:

enter image description here

So what is needed in this project to have pip libraries welcomed?


Solution

  • Switching to the brew installed python fixed the issue.

    enter image description here

    And here it is with nltk resolving now:

    enter image description here