Ubuntu18.04安装Theano出现“No module named 'theano.compat.six'”

ubuntu18.04安装Theano出现“No module named ‘theano.compat.six’”

如题,安装pylean2时,当执行python setup.py build后出现:

python setup.py build
Traceback (most recent call last):
  File "setup.py", line 8, in 
    from theano.compat.six.moves import input
ModuleNotFoundError: No module named 'theano.compat.six'

解决办法
直接在下载好pythearn2包的目录下,对setup.py文件进行修改,这里要用到vim编辑器,直接输入:
vim setup.py
进入setup.py之后,将
from theano.compat.six.moves import input 改为
from six.moves import input
然后 “Esc” + “ :” + “ wq ” + 回车键

接着继续执行python setup.py build ,就OK啦!

好像是Theano版本太高了还是怎滴..

你可能感兴趣的:(记事)