I'm trying to work through a tensorflow example which utilises sklearn and keep getting a DLL load error. I've cut down the code to the bare minimum in order to debug:
import sklearn
print(sklearn.__version__)
from sklearn.model_selection import train_test_split
#from sklearn.cross_validation import train_test_split
print('Success')
As you can see I'm using 0.19.1 of sklearn. I'm on a Windows 64b machine with Python 3.5 (64bit) installed using the Winpython installer. That installer came with numpy, scikit, etc, but I've used pip to make sure that they (and sklearn specifically) is up to date with the latest version.
Out of curiosity, I tried the code for the pre 0.18.1 sklearn version of model_selection (sklearn.cross_validation, commented out now) and it gave the exact same error for that line.
The folder for model_selection is correct and corresponds to the correct version of Python. I had previously Python 2.7 and Python 3.6 on this machine but have since uninstalled/ deleted them.
Thanks all for any help! I'm eager to get into some tensorflow tutorials.
The output/error log is:
0.19.1
Traceback (most recent call last):
File "C:\Users\cmacd\eclipse-workspace\NeuralNetwork1\Edureka_NN_Example.py", line 9, in <module>
from sklearn.model_selection import train_test_split
File "C:\Python64_35\WinPython\python-3.5.4.amd64\lib\site-packages\sklearn\model_selection\__init__.py", line 19, in <module>
from ._validation import cross_val_score
File "C:\Python64_35\WinPython\python-3.5.4.amd64\lib\site-packages\sklearn\model_selection\_validation.py", line 29, in <module>
from ..metrics.scorer import check_scoring, _check_multimetric_scoring
File "C:\Python64_35\WinPython\python-3.5.4.amd64\lib\site-packages\sklearn\metrics\__init__.py", line 33, in <module>
from . import cluster
File "C:\Python64_35\WinPython\python-3.5.4.amd64\lib\site-packages\sklearn\metrics\cluster\__init__.py", line 20, in <module>
from .unsupervised import silhouette_samples
File "C:\Python64_35\WinPython\python-3.5.4.amd64\lib\site-packages\sklearn\metrics\cluster\unsupervised.py", line 12, in <module>
from ..pairwise import pairwise_distances
File "C:\Python64_35\WinPython\python-3.5.4.amd64\lib\site-packages\sklearn\metrics\pairwise.py", line 30, in <module>
from .pairwise_fast import _chi2_kernel_fast, _sparse_manhattan
ImportError: DLL load failed: The specified module could not be found.