[Tutor] Installing numpy on Ubuntu

eryksun eryksun at gmail.com
Thu Feb 27 23:07:03 CET 2014


On Thu, Feb 27, 2014 at 4:18 PM, Pierre Dagenais <pierre.dagenais at ncf.ca> wrote:
> I've installed numpy on Ubuntu 12.04 with
>         sudo apt-get install python3-numpy.
> Everything seems to go OK

Probably you installed NumPy for python3.2:

http://packages.ubuntu.com/precise/python3-numpy

> Python 3.3.3 (default, Dec  9 2013, 08:33:48)
> [GCC 4.6.3] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import numpy
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named 'numpy'
>>>>
>
> What am I doing wrong,

Probably you built 3.3 from source or installed from the deadsnakes
PPA. Install the NumPy build dependencies and then build/install via
pip:

    $ sudo apt-get build-dep python3-numpy

You might want to `pip install numpy` in a virtual environment
(pyvenv-3.3 or virtualenv) for testing before pip-3.3 installing to
/usr/local. Or you could always use virtual environments and build a
wheel package for subsequent re-installations.


More information about the Tutor mailing list