Python Forum
How to Import Libraries like Numpy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Import Libraries like Numpy
#1
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.
Reply
#2
(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.
Reply
#3
Numpy must be installed. Imports are case sensitive.

import numpy as np
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  best practice for import libraries and using pyinstaller aster 3 2,885 Apr-17-2021, 11:12 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020