vs code 调用python第三方库时错误:Original error was: DLL load failed: 找不到指定的模块。

错误详情:

E:\software\anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "E:\software\anaconda3\lib\site-packages\numpy\core\__init__.py", line 24, in 
    from . import multiarray
  File "E:\software\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 14, in 
    from . import overrides
  File "E:\software\anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in 
    from numpy.core._multiarray_umath import (
ImportError: DLL load failed: 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\Administrator\Documents\python学习\a.py", line 2, in 
    import numpy
  File "E:\software\anaconda3\lib\site-packages\numpy\__init__.py", line 142, in 
    from . import core
  File "E:\software\anaconda3\lib\site-packages\numpy\core\__init__.py", line 54, in 
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.7 from "E:\software\anaconda3\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.1" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

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

出错前情况说明:

1.python可以正常使用
2.库可以正常调用

因为用sklearn这个库,需要几个库的配合,然后就卸载,重装一numpy这几个库,结果sklearn还是不能用,一怒之下卸载了anaconda,装了最新版本的,然后再去使用vs code,就罢工了,就是找不到第三方库

错误提示说找不到指定模块,昨天还能找到,今天我重装一下anaconda怎么就找不到了,抽你丫的,抽还是找不到

我只能一下一百度啊,搜出来的东西都一一试了,没啥用,搞得我都想放弃了,我看到一篇博客给我灵感,我想到了它找东西是按照路径的,如下:

python模块查找路径

python中每一个.py模块即为一个模块,python搜索模块路径为

1.当前文件夹路径
2.PYTHONPATH环境变量所对应的文件路径
3.python安装的标准链接库等文件夹路径
4.pth文件列出的文件夹路径

而我的vs code,emmmm…

vs code打印的路径vs code 调用python第三方库时错误:Original error was: DLL load failed: 找不到指定的模块。_第1张图片

Spyder打印的路径vs code 调用python第三方库时错误:Original error was: DLL load failed: 找不到指定的模块。_第2张图片

一个是E:\software\anaconda3\python37.zip
一个是E:\software\Anaconda3\python37.zip

路径不一样啊啊啊啊。

问题解决,相信编译器的报错,他说没找到,那他真是没找到。

你可能感兴趣的:(错误总结,python,anaconda)