A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

python错误

导入panda和numpy时出现如下错误

import pandas as pd
import numpy as np
1
2
Traceback (most recent call last):
  File "F:\Python 3.7\lib\site-packages\pandas\__init__.py", line 26, in <module>
    from pandas._libs import (hashtable as _hashtable,
  File "F:\Python 3.7\lib\site-packages\pandas\_libs\__init__.py", line 4, in <module>
    from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
ModuleNotFoundError: No module named 'pandas._libs.tslib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "F:\Python 3.7\lib\site-packages\pandas\__init__.py", line 35, in <module>
    "the C extensions first.".format(module))
ImportError: C extension: No module named 'pandas._libs.tslib' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
解决方案

卸载pandas和numpy,重新安装

pip uninstall numpy
pip uninstall pandas
---------------------
转载,仅作分享,侵删
作者:龙小马
原文:https://blog.csdn.net/wuhuideluori/article/details/85337998


1 个回复

倒序浏览
奈斯
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马