在将我的open source project从Python 2.7移植到Python 3.4时,我需要在运行Windows 7 Professional(Service Pack 1,64位)的计算机上安装sklearn.cluster包。我做了一个新的Miniconda3安装(64位)并创建了一个Python 3.4环境:
conda create -n P34 python=3.4
activate P34
然后我安装了scikit-learn:
conda install scikit-learn
此时环境包含以下包:
# 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
我现在跑步时:
from sklearn.cluster import DBSCAN
我收到以下错误消息:
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
我知道我不是第一个遇到这个问题的人(例如,参见this thread)。我尝试了我找到的所有建议(例如使用其他安装程序),但没有任何对我有用。
知道我可以做什么来获得scikit - 学习使用Python 3吗?