1

On this line

from sklearn.model_selection import train_test_split

I get error:

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

How to fix it?

Python 3.8 (32 bit) on Windows 7 x64.

abhilb
  • 5,639
  • 2
  • 20
  • 26
Ufx
  • 2,595
  • 12
  • 44
  • 83
  • Which version of sklearn you are using? – Joker09 Dec 11 '19 at 06:50
  • 1
    This packaging issue is being tracked at: https://github.com/scikit-learn/scikit-learn/issues/15899 In the mean time you can install scikt-learn from conda-forge: `conda install conda-forge::scikit-learn` – ogrisel Dec 18 '19 at 14:50

2 Answers2

-1

I had the same problem and downgrading to version less than 0.22 solved the same Please downgrade the version of sklearn to 0.21 or less

Joker09
  • 93
  • 7
-1

Installing the previous version of sklearn solved this for me.

Do it with: pip install -U scikit-learn==0.21rc2

Just to let you know, if you want to use it with Python 3.5 or never:

Warning

Scikit-learn 0.20 was the last version to support Python 2.7 and Python 3.4. Scikit-learn now requires Python 3.5 or newer.

https://scikit-learn.org/stable/install.html

Community
  • 1
  • 1
Jagoda Gorus
  • 329
  • 4
  • 18