In porting my open source project from Python 2.7 to Python 3.4 I need to install the sklearn.cluster package on my computer running Windows 7 Professional (Service Pack 1, 64bit). I did a fresh Miniconda3 installation (64bit) and created a Python 3.4 environment:
conda create -n P34 python=3.4
activate P34
I then installed scikit-learn:
conda install scikit-learn
At this point the environment comprises the following packages:
# packages in environment at C:\Users\rolf\Miniconda3\envs\P34:
#
intel-openmp 2018.0.0 hd92c6cd_8
mkl 2017.0.4 h6d528fc_0
numpy 1.11.3 py34_0
pip 9.0.1 py34_1
python 3.4.5 0
scikit-learn 0.18.1 np111py34_1
scipy 0.19.1 np111py34_0
setuptools 27.2.0 py34_1
vc 10 0
vs2010_runtime 10.00.40219.1 2
wheel 0.29.0 py34_0
When I now run:
from sklearn.cluster import DBSCAN
I get the following error message:
Traceback (most recent call last):
File "D:/SW-Development/Python/Test_Programs_Python3/Sklearn/sklearn_cluster.py", line 2, in <module>
from sklearn.cluster import DBSCAN
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\sklearn\base.py", line 12, in <module>
from .utils.fixes import signature
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
from ..utils.fixes import signature
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\sklearn\utils\fixes.py", line 291, in <module>
from scipy.sparse.linalg import lsqr as sparse_lsqr
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\scipy\sparse\linalg\__init__.py", line 113, in <module>
from .isolve import *
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
from .iterative import *
File "C:\Users\rolf\Miniconda3\envs\P34\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
from . import _iterative
ImportError: DLL load failed: %1 ist keine zulässige Win32-Anwendung.
Process finished with exit code 1
I know that I'm not the first one running into this problem (see, for example, this thread). I tried all the suggestions I found (e.g. use other installers), but nothing worked for me.
Any idea what I can do to get scikit-learn to work on Python 3?