Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

import theano gets Illegal instruction

after install the bleeding-edge version and even uninstall Theano, I'm still getting "Illegal instruction" from "import theano", i'm on ubuntu 12.04 precise

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:~$
like image 666
neghez Avatar asked Mar 30 '15 03:03

neghez


1 Answers

This can happen when you move from one computer to another with the same .local directory. The following (from here) worked for me:

First delete ~/.theano which stores some theano compiled files. Then reinstall theano via pip uninstall theano; pip install --user theano. It also fixes the gensim install for some reason (which shows the same error upon importing). Perhaps gensim imports theano when it can?

like image 53
simonzack Avatar answered Oct 15 '22 13:10

simonzack