2017-05-24 4 views
1

Auf meinem Computer hat sklearn funktioniert wie vor einem halben Jahr, ich habe aufgehört, es zu verwenden, und jetzt ist es nicht. Ich habe Probleme mit einer Import-Anweisung in meinem program.py:sklearn kann Name nicht importieren _ellipsoid

from sklearn import tree 

die wirklich unordentlich aussieht:

Traceback (most recent call last): File "E:/DecisionModel.py", line 1, in <module> 
    from sklearn import tree File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\__init__.py", line 57, in <module> 
    from .base import clone File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\base.py", line 12, in <module> 
    from .utils.fixes import signature File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module> 
    from .validation import (as_float_array, File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\validation.py", line 18, in <module> 
    from ..utils.fixes import signature File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\fixes.py", line 403, in <module> 
    from scipy.stats import rankdata File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\stats\__init__.py", line 344, in <module> 
    from .stats import * File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\stats\stats.py", line 173, in <module> 
    import scipy.special as special File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\special\__init__.py", line 643, in <module> 
    from ._ellip_harm import ellip_harm, ellip_harm_2, ellip_normal File "C:\Users\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\special\_ellip_harm.py", line 7, in <module> 
    from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm ImportError: cannot import name '_ellipsoid' 

nützliche Hinweise: Während vor war der Fehler, dass es nicht NUMPY_MKL importieren was ich als Rad von here installiert habe.

Antwort

1

Haben Sie versucht, scikit-learn neu zu installieren? Wenn Sie pip verwenden, können Sie die folgenden Befehle gehen geben:

python -m pip install --upgrade pip 
python -m pip install --upgrade --force-reinstall scikit-learn 
+0

gut neu installieren scikit-lernen, das Problem gelöst, aber ich bin nicht mit dem Ergebnis zufrieden - ich musste es vom Rad installieren, denn pip funktioniert nicht mit scikit-lernen. (Windows 10 Python 3.5 64 Bit) –

+0

Sie können 'pip' installieren: https://Stackoverflow.com/a/12476379/1293700 –

0

Ich hatte das gleiche Problem. Ich habe das Problem gelöst, indem ich scipy auf die neueste Version aktualisiert habe.

Verwandte Themen