在安装最新版本甚至卸载Theano之后,我仍然从“import theano”获得“非法指令”,我在ubuntu 12.04上精确
zhge@phx-r-ins1-7773:~$ sudo pip uninstall Theano
Uninstalling Theano:
Proceed (y/n)? y
Successfully uninstalled Theano
zhge@phx-r-ins1-7773:~$ python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
Illegal instruction
zhge@phx-r-ins1-7773:~$
最佳答案
当您从一台计算机移动到具有相同.local
目录的另一台计算机时,可能会发生这种情况。以下内容(来自here)为我工作:
首先删除存储一些theano编译文件的~/.theano
。然后通过pip uninstall theano; pip install --user theano
重新安装theano。它还出于某些原因修复了gensim安装(导入时显示相同的错误)。也许gensim何时可以导入theano?
关于python-2.7 - 进口theano得到非法指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29338016/