installing pylearn2 - ImportError: No module named six.moves

Viewed 4486

I'm trying to install pylearn2. I'm using a fresh virtual environment where I've only install the development versions of theano and pygpu. I have tested them and both are working fine. However, when I try to install pylearn2 I get this error:

$ python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    from theano.compat.six.moves import input
ImportError: No module named six.moves

I have tried installing six as was suggested in some places, but it tells me that it's already been installed:

$ pip install six
Requirement already satisfied: six in /home/virt_env/virt1/lib/python2.7/site-packages

Has anyone else run into this problem?

3 Answers

Theano is not using theano/compat/six.py any more.

Six now is a library, you can install six by using:

pip install six

Then edit the line in setup.py:

from theano.compat.six.moves import input

to

from six.moves import input

Related