简体   繁体   中英

ModuleNotFoundError: No module named 'panda' though panda is installed on my mac os

I have installed anaconda on my mac os. But when I am trying to import panda library, It is throwing error as panda module not found.

So when I again try to install panda. It says panda already installed on machine

C27:python-programming jyoti.aditya$ pip install pandas
Requirement already satisfied: pandas in 
/Users/aditya/anaconda3/lib/python3.7/site-packages (0.23.4)
Requirement already satisfied: python-dateutil>=2.5.0 in 
/Users/aditya/anaconda3/lib/python3.7/site-packages (from pandas) 
(2.7.3)
Requirement already satisfied: pytz>=2011k in 
/Users/aditya/anaconda3/lib/python3.7/site-packages (from pandas) 
(2018.5)
 Requirement already satisfied: numpy>=1.9.0 in 
/Users/aditya/anaconda3/lib/python3.7/site-packages (from pandas) 
(1.15.1)
Requirement already satisfied: six>=1.5 in 
/Users/aditya/anaconda3/lib/python3.7/site-packages (from python- 
dateutil>=2.5.0->pandas) (1.11.0)

But when I try to import Panda library in my python code. It throws error

C27:python-programming aditya$ python
Python 3.7.0 (default, Jun 28 2018, 07:39:16)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import panda as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'panda'

The module name is pandas , not panda . Customarily it is imported like this:

import pandas as pd

See the 10 Minutes to pandas page for a quick introduction to the library.

You have installed pandas via pip but when trying to import it you have missed the s off the end of pandas .

import pandas as pd will work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM