ImportError: No module named lasagne

2,651 views
Skip to first unread message

Jim Kao

unread,
Apr 30, 2015, 1:04:50 AM4/30/15
to lasagn...@googlegroups.com
Hi 

I run int the issue to import lasagne into python

I have used conda to install Anaconda package
jkao@debian:~/Media/Lasagne/examples$ which python
/home/jkao/anaconda/bin/python

I did install Lasagne from source through

python setup.py install

From log it seems fine
Processing dependencies for Lasagne==0.1.dev0
Searching for Theano==0.7.0
Best match: Theano 0.7.0
Processing Theano-0.7.0-py2.7.egg
Theano 0.7.0 is already the active version in easy-install.pth
Installing theano-nose script to /usr/local/bin
Installing theano-test script to /usr/local/bin
Installing theano-cache script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/Theano-0.7.0-py2.7.egg
Searching for numpy==1.6.2
Best match: numpy 1.6.2
numpy 1.6.2 is already the active version in easy-install.pth

Using /usr/lib/pymodules/python2.7
Searching for scipy==0.15.1
Best match: scipy 0.15.1
Processing scipy-0.15.1-py2.7-linux-x86_64.egg
scipy 0.15.1 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/scipy-0.15.1-py2.7-linux-x86_64.egg
Finished processing dependencies for Lasagne==0.1.dev0

However, Lasagne module can't find in examples program.

Processing dependencies for Lasagne==0.1.dev0
Searching for Theano==0.7.0
Best match: Theano 0.7.0
Processing Theano-0.7.0-py2.7.egg
Theano 0.7.0 is already the active version in easy-install.pth
Installing theano-nose script to /usr/local/bin
Installing theano-test script to /usr/local/bin
Installing theano-cache script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/Theano-0.7.0-py2.7.egg
Searching for numpy==1.6.2
Best match: numpy 1.6.2
numpy 1.6.2 is already the active version in easy-install.pth

Using /usr/lib/pymodules/python2.7
Searching for scipy==0.15.1
Best match: scipy 0.15.1
Processing scipy-0.15.1-py2.7-linux-x86_64.egg
scipy 0.15.1 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/scipy-0.15.1-py2.7-linux-x86_64.egg
Finished processing dependencies for Lasagne==0.1.dev0

Sander Dieleman

unread,
Apr 30, 2015, 4:31:18 AM4/30/15
to lasagn...@googlegroups.com
It looks like you are installing Lasagne into your distribution's main Python installation, and not in the anaconda installation. Make sure you run "python setup.py install" with the python from anaconda, not with the system python executable.

Sander

Jim Kao

unread,
Apr 30, 2015, 5:33:56 PM4/30/15
to lasagn...@googlegroups.com
Sander,

I did check python which is from anaconda
jkao@debian:~/Media/Lasagne$ which python
/home/jkao/anaconda/bin/python
jkao@debian:~/Media/Lasagne$

It seem to me that I might miss some in setup.py under Lasagne such it is installed in main Python.

Regards
Jim

Jim Kao

unread,
Apr 30, 2015, 8:25:47 PM4/30/15
to lasagn...@googlegroups.com

I found that setuptools and scipy python package was installed in main python site package path.
I re-installed those through conda then it work fine now.
Thanks
Jim

Sander Dieleman

unread,
Apr 30, 2015, 8:27:12 PM4/30/15
to lasagn...@googlegroups.com
Great, thanks for the update :)

Sander
Message has been deleted

youngh...@gmail.com

unread,
Jul 25, 2015, 12:44:49 PM7/25/15
to lasagne-users, jungh...@gmail.com
Hi, I'm facing the same problem, could you tell me what you have to run to install packages with anaconda instead of python?
Thanks,
Reply all
Reply to author
Forward
0 new messages