Python Forum

Full Version: How to Import Libraries like Numpy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am a beginner in Python. I downloaded Python on my mac and started Python 3.7.3 Shell.
Though I imported 'math' library as 'import math', I am not being able to import 'Numpy' and others.

Input text: >>> import Numpy as np


Error message:
Error:
Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import Numpy as np ModuleNotFoundError: No module named 'Numpy'
Could anyone please advise how to import libraries?
Thanx.
(Jul-08-2019, 02:19 AM)ajay3adhikari Wrote: [ -> ]I am not being able to import 'Numpy' and others.
You probably need to install NumPy first? Check out NumPy's official docs on how to install numpy on your operating system. Note: importing is case-sensetive, try import numpy as np.
Numpy must be installed. Imports are case sensitive.

import numpy as np