获取" ImportError:无法导入名称字符串"当试图运行Pylearn2 make_cifar100_whitened.py时

时间:2017-02-14 18:34:25

标签: python pylearn2

当我尝试在make_cifar100_whitened.py内运行Pylearn2/scripts/datasets时,我得到:

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

这里有什么问题?

1 个答案:

答案 0 :(得分:0)

好像我找到了修复。 实际的导入需要

from pylearn2.utils import string_utils as string