You have named the file the same as the library name. ImportError: cannot import name 'ma' from 'numpy' (/home/ubuntu/numpy.py). Please rename the file /home/ubuntu/numpy.py to something else.