简体   繁体   中英

I can't import pandas in pycharm there is a error: AttributeError: module 'pandas' has no attribute 'core'

I can't import pandas in pycharm as it says:AttributeError: module 'pandas' has no attribute 'core'

my python version is python 3.6 my OS is win10 here is my whole imformantion about the error:

import pandas as pd
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\Lll\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\__init__.py", line 43, in <module>
    from pandas.io.api import *
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\Lll\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\api.py", line 17, in <module>
    from pandas.io.packers import read_msgpack, to_msgpack
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Users\Lll\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\io\packers.py", line 65, in <module>
    import pandas.core.internals as internals
AttributeError: module 'pandas' has no attribute 'core'

I was having the same error when I updated my Python version from 3.5 to 3.6. In python 3.5, I was using pandas 0.19.2, so I updated the panda's version to 0.20.1 and the importation was successful.

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