我正在使用
yahoo_fin
并安装它会自动安装 pandas
和 numpy
。这很好,我的程序运行顺利。然而,我今天早上睡觉醒来并再次运行我的程序,并得到这个错误..
ImportError: Unable to import required dependencies:
numpy:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.10 from "/Users/gabekutner/Documents/GitHub/StockPortfolioWebsite/myproject_virtualenv/env/bin/python3"
* The NumPy version is: "1.25.1"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
我已经访问了他们推荐我访问的链接,但我找不到任何答案。奇怪的是,当我第一次安装这些库时,这不是问题。直到后来我才明白。这是为什么?我该如何解决?
我已经重新安装了
pandas
和numpy
,然后我的程序可以运行,但是在离开计算机并返回后几个小时后,我收到了上述错误。