lisa-lab/pylearn2

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

Closed this issue · 5 comments

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?

nouiz commented

oh! well! good to know its a dead project now!
by the way thank you for pointing that out

Ok Thanks to God, It seems I found the fix.
the actual import needs to be
from pylearn2.utils import string_utils as string

http://stackoverflow.com/a/42234257/2736559

nouiz commented

@nouiz : Ok seems I made it finally! two PRs are made !