Getting "ImportError: cannot import name string" when trying to run Pylearn2 make_cifar100_whitened.

40 views
Skip to first unread message

Hossein Hasanpour

unread,
Feb 14, 2017, 2:01:41 PM2/14/17
to pylearn-users
When I am trying to run `make_cifar100_whitened.py` inside `Pylearn2/scripts/datasets` I get :

    G:\pylearn2-master\pylearn2\scripts\datasets>make_cifar100_whitened.py
    WARNING
(theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
    WARNING
(theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
   
Traceback (most recent call last):
     
File "G:\pylearn2-master\pylearn2\scripts\datasets\make_cifar100_whitened.py", line 10, in <module>
       
from pylearn2.utils import string
   
ImportError: cannot import name string


What is wrong here? 

Hossein Hasanpour

unread,
Feb 14, 2017, 2:06:15 PM2/14/17
to pylearn-users

Ok It seems I found the fix. the actual import needs to be

from pylearn2.utils import string_utils as string
Reply all
Reply to author
Forward
0 new messages