0

The same think happens for python3-scipy. I installed python-numpy/scipy, python3-numpy/scipy/ using Synaptic. But they are installed under python3 not python3.2. My system is Ubuntu 12. Can anyone have experience of Synaptic?

ImportError: No module named numpy.
3
  • check whether /usr/lib/python3/dist-packages is in sys.path Commented Aug 2, 2012 at 4:44
  • @J.F.Sebastian where is sys.path? If not in sys.path, how to put it in? Commented Aug 2, 2012 at 4:48
  • import sys; print(sys.path) Commented Aug 2, 2012 at 4:50

1 Answer 1

0

On Ubuntu 12.04 /usr/bin/python3.2 and /usr/bin/python3 is the same Python. Hence, if it is installed for /usr/bin/python3 it is also installed for /usr/bin/python3.2 (unless you have overwritten /usr/bin/python3.2, of course).

I therefore suspect that you have more than one installation of Python on your machine, perhaps a /usr/local/bin/python3.2?

When you install a module with Synaptic (or apt-get or aptitude etc) it will be installed only for the system-provided Python, ie the ones in /usr/bin. If you want to use it for any other installation, you have to install it for that installation as well, and then you need to follow the installation instructions from that packages documentation.

Often pip install <packagename> will work, but not all packages are installable that way (most notably pip itself, of course).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.