Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。
Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。
·
在命令行窗口进入Python,import numpy(任意包)时出现如下问题:
make sure that they are versions that you expect.意思就是numpy包版本不匹配,更新numpy就可以
pip install --upgrade numpy
若下载时间过长,大概率是网速不够,导致下载超时:
这时我们通过改变默认时间来查看numpy正确版本
pip --default-timeout=1000 install -U numpy
记住numpy契合的版本此时是1.23.1
pip3 install numpy==1.23.1 scipy matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
我这里是1.23.1,不同python版本对应的是不一样的,需要根据自己实际情况修改代码
到此更新成功:
调用时便不会报错
更多推荐
所有评论(0)