[Tutor] Installing numpy on Ubuntu

2014-02-27 Thread Pierre Dagenais
I've installed numpy on Ubuntu 12.04 with
sudo apt-get install python3-numpy.
Everything seems to go OK, yet when I try to use it I get this error:

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,

Your help is appreciated,

PierreD.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Installing numpy on Ubuntu

2014-02-27 Thread eryksun
On Thu, Feb 27, 2014 at 4:18 PM, Pierre Dagenais pierre.dagen...@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.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Installing numpy on Ubuntu

2014-02-27 Thread Danny Yoo
I believe this is more an Ubuntu question than a Python one.

You mentioned you're using Ubuntu 12.04.  But the version of Python 3
in that Ubuntu is Python 3.1:

http://packages.ubuntu.com/lucid/python/python3

And your console shows that you're running 3.3.3.  So it's likely that
you are running a Python that did not come bundled with your Linux
distribution.

Therefore, you will probably want to switch back to using the standard
one that came with your distribution. Alternatively, you can build
numpy from source and install it that way.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Installing numpy on Ubuntu

2014-02-27 Thread eryksun
On Thu, Feb 27, 2014 at 5:11 PM, Danny Yoo d...@hashcollision.org wrote:
 You mentioned you're using Ubuntu 12.04.  But the version of Python 3
 in that Ubuntu is Python 3.1:

 http://packages.ubuntu.com/lucid/python/python3

12.04 (precise), not 10.04 (lucid). So the python3-numpy package
targets Python 3.2, but it's the same problem.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Installing numpy on Ubuntu

2014-02-27 Thread Pierre Dagenais


On 14-02-27 05:40 PM, eryksun wrote:
 On Thu, Feb 27, 2014 at 5:11 PM, Danny Yoo d...@hashcollision.org wrote:
 You mentioned you're using Ubuntu 12.04.  But the version of Python 3
 in that Ubuntu is Python 3.1:

 http://packages.ubuntu.com/lucid/python/python3
 
 12.04 (precise), not 10.04 (lucid). So the python3-numpy package
 targets Python 3.2, but it's the same problem.
 
Thank you all,
You were right on, I was running a mix of 3.3 and 3.2. I've made the
corrections and now it works
PierreD.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor