报错信息:
- Traceback (most recent call last):
File "D:\pythoncode\mypython\countryUtil\country1.py", line 3, in <module>
import pandas as pd
File "D:\pythoncode\mypython\.venv\Lib\site-packages\pandas\__init__.py", line 32, in <module>
raise ImportError(
"Unable to import required dependencies:\n" + "\n".join(_missing_dependencies)
)
ImportError: Unable to import required dependencies:
numpy: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.无法导入所需的依赖项:
numpy:导入numpy错误:您不应该尝试从
它的源目录;请退出numpy源代码树,然后重新启动
你的python解释器。或者:
No module named 'numpy.core._multiarray_umath
解决方案:
找了好多资料都无法解决,有可能把环境那些搞乱了。建议直接删除python安装包,重新下载安装,下载版本低一点的且稳定的,目前重新安装之后,可以使用pandas了。