2

For five days or so I could start a script with numpy without problems. I installed it like here in the forum proposed and it worked. when I try to start another python script with numpy today, I got the following error:

Traceback (most recent call last):
  File "neuralTensorNetworkAcc.py", line 8, in <module>
    import numpy as np
ImportError: No module named numpy

But numpy seems to be installed:

[ec2-user@ip-172-31-10-106 sk-learn]$ sudo yum install numpy                    Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest                                         | 2.1 kB     00:00
amzn-updates/latest                                      | 2.3 kB     00:00
Package python26-numpy-1.7.2-8.16.amzn1.x86_64 already installed and latest version
Nothing to do

What is wrong? How to fix that bug?

Thanks in advance!

user3352632
  • 617
  • 6
  • 18
  • 3
    run `python --version` to ensure that python2.6 is set to be the default python version. – boaz_shuster May 31 '15 at 21:31
  • http://stackoverflow.com/questions/2325923/how-to-fix-importerror-no-module-named-error-in-python, http://stackoverflow.com/questions/23417941/python-import-error-no-module-named-does-exist – BMW Jun 01 '15 at 01:29
  • My python version: Python 2.7.9 – user3352632 Jun 01 '15 at 11:49
  • If the default python version is not 2.6, you can change it using an alias: `alias python=/usr/bin/python2.6`. To make that alias permanent, add it to your `~/.bashrc` file. [Here](https://stackoverflow.com/a/19256389/7560187) is a great post for further reading. – Renel Chesak Nov 19 '17 at 19:40

0 Answers0