DLL load failed while importing _openmp_helpers: The specified module could not be found.
See original GitHub issueDescription
After updateing my python version and packages this error started when I tried to import sklearn. It only happens in Python 32-bits, with the 64-bits version, everthing work.
with Python 3.8 (32-bits)
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32 Type “help”, “copyright”, “credits” or “license” for more information.
import sklearn ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found.
with Python 3.8 (64-bits)
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32 Type “help”, “copyright”, “credits” or “license” for more information.
import sklearn No erros!
Steps/Code to Reproduce
python 3.8 (32-bits) and scikit-learn 0.22 import sklearn
with python 3.8 (64-bits) everthing works fine.
Expected Results
No error is thrown.
Actual Results
import sklearn Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “C:\Users.…\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn_init_.py”, line 75, in <module> from .utils._show_versions import show_versions File “C:\Users.…\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils_show_versions.py”, line 12, in <module> from ._openmp_helpers import _openmp_parallelism_enabled ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found.
Versions
Python 3.8 (32 bits)
import platform; print(platform.platform()) Windows-10-10.0.18362-SP0 import sys; print(“Python”, sys.version) Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] import numpy; print(“NumPy”, numpy.version) NumPy 1.17.4 import scipy; print(“SciPy”, scipy.version) SciPy 1.3.3 import sklearn; print(“Scikit-Learn”, sklearn.version) Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “C:\Users.…\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn_init_.py”, line 75, in <module> from .utils._show_versions import show_versions File “C:\Users.…\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils_show_versions.py”, line 12, in <module> from ._openmp_helpers import _openmp_parallelism_enabled ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be found.
pip list Package Version
Cython 0.29.14 joblib 0.14.0 matplotlib 3.1.2 numpy 1.17.4 pip 19.3.1 scikit-learn 0.22 scikit-optimize 0.5.2 scipy 1.3.3 setuptools 41.2.0
with Python 3.8 (64-bits)
import sklearn; sklearn.show_versions()
System: python: 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] executable: C:\Users.…\AppData\Local\Programs\Python\Python38\python.exe machine: Windows-10-10.0.18362-SP0
Python dependencies: pip: 19.3.1 setuptools: 41.2.0 sklearn: 0.22 numpy: 1.17.4 scipy: 1.3.3 Cython: 0.29.14 pandas: None matplotlib: 3.1.2 joblib: 0.14.0
Built with OpenMP: True
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
I had same problem, now its working after installing after installing latest Microsoft Visual C++ re-distributable. Link: https://support.microsoft.com/en-in/help/2977003/the-latest-supported-visual-c-downloads
Hi @jeremiedbb , I have quite the same configuration Windows (64 bits with 32 bits compat, x86_64) and I installed Python direct from https://www.python.org/downloads/ and scikit-learn from (pip install scikit-learn).
Actually I just found the problem, somehow looks like the new version of scikit-learn (0.22) accept my MS C++ 2017 version during installation but don’t work with it. I found this out when I tried to install version 0.21 and got an error that I didn’t have the correct version of VS C++ tool. It started to work after I installed the MS C++ 2019. Maybe there is a problem with the MS C++ version check.