Jupyter Notebook虚拟环境import osmnx出错

在jupyter notebook下导入osmnx包,出现错误:

ImportError: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

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](https://numpy.org/devdocs/user/troubleshooting-importerror.html)

Please note and check the following:

  * The Python version is: Python3.8 from "D:\Software\Anaconda3\envs\snp\python.exe"
  * The NumPy version is: "1.19.4"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块。

错误原因及方法:猜测是numpy版本不一致,进行卸载重装是最简单的方法,pip uninstall numpypip install numpy,然后重启,测试,结果又有错误提示,这次的提示是

RuntimeError: The current Numpy installation ('D:\\Software\\Anaconda3\\envs\\snp\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: [https://tinyurl.com/y3dm3h86](https://tinyurl.com/y3dm3h86)

错误原因及方法:按照提示网址查看是numpy版本自身存在的问题,按照提示的变通方案是安装其他版本的numpy,即卸载后重新安装pip install numpy==1.19.3

再次导入,测试成功!

osmnx导入成功

你可能感兴趣的:(Jupyter Notebook虚拟环境import osmnx出错)