question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
duttasudiptacommented, Dec 18, 2019

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

1reaction
WalterMskcommented, Dec 5, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DLL load failed: The specified module could not be found ...
It was giving this error: ImportError: DLL load failed: The specified module could not be found. Opened a Visual Studio x64 command prompt....
Read more >
ImportError: DLL load failed: The specified module ... - GitHub
I closed the repository and created a virtualenv environment for it and did the pip install -r requirements. Now when starting the server...
Read more >
How to Fix Python ImportError: Dll Load Failed Error
This post offers 2 ways to fix the error "ImportError: Dll Load Failed: The specified module could not be found."
Read more >
dll load failed the specified module could not be found (Fix)
importerror: dll load failed: The specified module could not be found error occurs because of the incompatibilities of Microsoft Visual C++ (Visual Studio) ......
Read more >
[Example code]-ImportError: dll load failed while importing ...
Coding example for the question ImportError: dll load failed while importing _openmp_helpers: The specified module could not be found while importing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found