python ImportError: C extension: DLL load failed while importing strptime的解决办法

程序一直用得好好的,再新建一个PY,显示如下错误:

import pandas as pd #导入panads
File “C:\Users\lenovo\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas_init_.py”, line 35, in
raise ImportError(
ImportError: C extension: DLL load failed while importing strptime: 拒绝访问。 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.

提示未导入的pandas 错误,因为已经安装还运行正常,不明就理
解决办法,重新卸载,
pip uninstall pandas
再安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas

提示:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘c:\users\lenovo\appdata\local\programs\python\python38-32\Lib\site-packages\pandas\_libs\tslibs\strptime.cp38-win32.pyd’
Consider using the --user option or check the permissions.

再安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas --user
成功!

不知道pandas库什么原因坏掉了,重新安装就正常了
后记:
后来出现过几次,发现是杀软把有的PYD文件给删除造成的。

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值