简体   繁体   中英

ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found

I want to import some function from sklearn module :

from sklearn.preprocessing import StandardScaler

But it return this ImportError :

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-3fb1a94f6848> in <module>
      3 import scipy.io
      4 from matplotlib import pyplot as plt
----> 5 from sklearn.preprocessing import StandardScaler
      6 from sklearn.decomposition import PCA
      7 

c:\users\jules\appdata\local\programs\python\python37\lib\site-packages\sklearn\__init__.py in <module>
     73     from . import __check_build
     74     from .base import clone
---> 75     from .utils._show_versions import show_versions
     76 
     77     __check_build  # avoid flakes unused variable error

c:\users\jules\appdata\local\programs\python\python37\lib\site-packages\sklearn\utils\_show_versions.py in <module>
     10 import importlib
     11 
---> 12 from ._openmp_helpers import _openmp_parallelism_enabled
     13 
     14 

ImportError: DLL load failed: Le module spécifié est introuvable.

In fact, I checked the utils folder and don't found _openmp_helpers.pyx .

Recently, I must changed from macOs to Windows. I didn't have this problem with macOs. I installed sklearn using pip install sklearn , and I'm using jupyter notebook for this student project.

pip -V : 19.3.1
python --version : Python 3.7.5

I had the same problem and resolved it only through getting back to one of the previous versions of scikit-learn (namely 0.20.2 which I kept with an older installation of python). Try downgrading sklearn.

Yes it works, but I don't think it's the best way to fix the problem: no ? At least, it will help me to go forward in my project, but I'm still attentive to an other solution, without using Anaconda.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM