Bootstrap

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

Traceback (most recent call last):
  File "c:/Users/19051/Desktop/getPMSampleList.py", line 7, in <module>
    import pandas as pd
  File "D:\softwareInstall\miniconda37\lib\site-packages\pandas\__init__.py", line 17, in <module>
    "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
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.7 from "D:\softwareInstall\miniconda37\python.exe"
  * The NumPy version is: "1.21.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: 找不到指定的模块。

注意点:

 Unable to import required dependencies:

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

我还是喜欢使用老版本的python,新版本的python会出现很多依赖包版本太高,又或者太低的现象。 这个就是numpy版本太高了。 我就安装了numpy==1.18.1

(base) C:\Users\19051\Desktop>conda install -c conda-forge numpy==1.18.1
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: D:\softwareInstall\miniconda3.76

  added / updated specs:
    - numpy==1.18.1


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    numpy-1.18.1               |   py37h90d3380_1         4.7 MB  conda-forge
    pandas-1.3.1               |   py37h90003fb_0        10.8 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        15.6 MB

The following packages will be DOWNGRADED:

  numpy                               1.21.5-py37h5fa1a60_0 --> 1.18.1-py37h90d3380_1
  pandas                               1.3.5-py37h9386db6_0 --> 1.3.1-py37h90003fb_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
numpy-1.18.1         | 4.7 MB    | ############################################################################ | 100%
pandas-1.3.1         | 10.8 MB   | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

再导入pandas就没有问题了。

PS:另外一种情况解决方式:卸载掉conda安装的包,改使用pip安装就可以了。

;