I am trying to import a library called pylearn2 in spyder (anaconda). I get an error that the module is not found. I try from pylearn2 import models
I get the following error:
from pylearn2 import models
File "pylearn2.py", line 1, in <module>
from pylearn2 import models
ImportError: cannot import name models
If I type import pylearn.
the intellisense includes all options, including models.
If I open ipython notebook I can run the command.
I added various levels of the path to the PYTHONPATH variable using Spyder's manager but to no effect. Any idea why this is happening? I updated spyder via conda and at using python 2.7.
EDIT: Additional info:
The command import pylearn2
appears to work
The pythonpath is the same between spyder and ipython notebook:
'', '/home/jma/anaconda/lib/python2.7/site-packages/Lasagne-0.1.dev0-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages/nolearn-0.6a0.dev0-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages/joblib-0.8.4-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages/argparse-1.3.0-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages/pylearn2',
'/home/jma/anaconda/lib/python27.zip',
'/home/jma/anaconda/lib/python2.7',
'/home/jma/anaconda/lib/python2.7/plat-linux2',
'/home/jma/anaconda/lib/python2.7/lib-tk',
'/home/jma/anaconda/lib/python2.7/lib-old',
'/home/jma/anaconda/lib/python2.7/lib-dynload',
'/home/jma/anaconda/lib/python2.7/site-packages/runipy-0.1.1-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages/setuptools-15.0-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages',
'/home/jma/anaconda/lib/python2.7/site-packages/PIL',
'/home/jma/anaconda/lib/python2.7/site-packages/Sphinx-1.2.3-py2.7.egg',
'/home/jma/anaconda/lib/python2.7/site-packages/IPython/extensions