Question

More than two weeks ago I tried to use numpy to find eigen vectors and eigen values of a 2 by 2 matrix. It did not work, I got Illegal instruction (core dumped), message. I asked the question on stackoverflow (here).

The answer was that the syntax is correct and that I need to try a fresh installation and it has probably something to do with "SSE/SSE3-enabled binaries" (whatever it means).

Directed by these answer I did the following:

sudo apt-get install python-virtualenv
virtualenv ~/python2/
source ~/python2/bin/activate
pip install numpy
python tmp.py

In my tmp.py I have:

import numpy as np
from numpy import linalg as la
w, v = la.eig(np.array([[1, -1], [1, 1]]))

As a result I got the same error message: Illegal instruction (core dumped).

Does anybody know how python and numpy have to be installed to get it work?

ADDED

The following sequence does not resolve the problem:

sudo pip install virtualenv
sudo pip install virtualenv --upgrade
virtualenv venv
~/venv/bin/activate
source ~/venv/bin/activate
pip install numpy
python tmp.py 
Était-ce utile?

La solution

I would recommend to make a try in a direction from original question comment, that is reinstall blas/lapack. See there for package names http://ubuntuforums.org/showthread.php?t=1505249, and recompile numpy.

Autres conseils

>sudo pip install virtualenv
>sudo pip install virtualenv --upgrade
>virtualenv venv
>. venv/bin/activate
>pip intsall <any package>

You need to upgrade the virtualenv

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top