Intellij not finding Python modules installed via pip

Viewed 4636

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?

3 Answers

Also add your site-packages path in in your project classpath if you still get import error

e.g. /usr/local/lib/python2.7/site-packages

Related