How to resolve error while importing modules in python




I am trying to learn python but faced a error:

>>> import os
>>> os.chdir('/home/anaconda3/lib/python3.5/site-packages')
>>> import numpy

But this gives me an error:

How do i remove this error??


which os are you on?

Most likely your path is not set to include directory with numpy installation.



Are you sure you have numpy installed?

If you’re using pip, then you type “pip freeze” and check if numpy exists as a package. If you’re using iPython notebook you can type "import " and press Tab and you see a list of packages.

If its there, than a last resort can be to uninstall and reinstall the package.

Let me if it doesn’t work out.