本文介绍了ImportError:缺少必需的依赖项['numpy']的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够成功运行所有使用pandas的脚本,但突然我的所有PANDAS SCRIPTS都出现此错误:

I was able to run all scripts successfully which is using pandas , but suddenly all my PANDAS SCRIPTS are giving this error :

回溯(最近通话最近一次):

Traceback (most recent call last):

文件"data_visulaization.py",第5行,位于

File "data_visulaization.py", line 5, in

import pandas as pd
raise ImportError("Missing required dependencies {0}".format(missing_dependencies))


ImportError: Missing required dependencies ['numpy']

最近我还没有安装或更新任何新东西.

Recently i have not installed or updated any new things.

有人对此有解决方案吗?

Does anyone have a solution for this?

我卸载了pandas和numpy并重新安装了它们,但是仍然遇到相同的问题.

I uninstalled pandas and numpy and re-installed them but still facing the same issue.

推荐答案

我找到了解决方案,实际的问题是,如果您最近使用的任何python脚本都已生成".pyc"扩展名文件,则会发生此错误.

I found the solution , the actual problem is if any of your recent python scripts have generated ".pyc" extension file this error will occur .

解决方案是删除所有文件.

solution is to delete those files that's all.

这篇关于ImportError:缺少必需的依赖项['numpy']的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 02:19
查看更多