I have an ipython notebook which starts with
import sklearn
When I run it, I get :
ImportError: No module named sklearn
I was able to fix this error on Ubuntu by adding a cell to the top of the notebook appending the module directory to the path:
import sys
sys.path.append('/usr/lib/python2.7/dist-packages')
The path to add can be found when running pip install
, (such as numpy) and it tells you where each package is installed or already exists.