2

Previously I installed Numpy for Python-3.4.0. Now that I installed conda, Python-3.4.2 comes with it, instead. So when I run python3 I use Python-3.4.2 instead. And when I call import numpy I get an ImportError. When I try to run sudo apt-get install python3-numpy I get this error saying it is already installed.

Summary:

begueradj@begueradj-HP-Compaq-6510b-KE130ET-ABF:/home$ sudo apt-get install python3-numpy
[sudo] password for begueradj: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-numpy is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 323 not upgraded.
begueradj@begueradj-HP-Compaq-6510b-KE130ET-ABF:/home$ python3
Python 3.4.2 |Continuum Analytics, Inc.| (default, Oct 21 2014, 17:40:08) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] 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'
>>> 

How can I resolve this ?

  • Sometimes you can run into problems with different versions of Python that the Python package (e.g. Numpy) that installed and ran successfully on one version of Python doesn't work on an updated version of Python. Sometimes it works, sometimes it doesn't, but even if it doesn't work you can use pip3 (the pip3 package is called python3-pip in Ubuntu) to install the latest version of Numpy using pip3 install -U numpy. – karel Feb 22 '15 at 11:34
  • @karel Thank you for trying to help me. I run that command, it is installed again but I get the same ImportError error message –  Feb 22 '15 at 11:49

0 Answers0