导入sklearn.model_selection时遇到问题

时间:2019-12-07 08:11:53

标签: python numpy scikit-learn scipy anaconda

感觉Scipy模块上有问题。

尝试重新安装并重新安装所有模块。但仍然出现此错误。任何帮助请!

在我决定安装tensorflow之前,一切都很好,直到一切都乱了。

我正在jupyter实验室和anaconda导航仪上运行此程序。

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-827301e419e8> in <module>
      1 import pandas as pd
----> 2 import sklearn.model_selection

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\sklearn\__init__.py in <module>
     72 else:
     73     from . import __check_build
---> 74     from .base import clone
     75     from .utils._show_versions import show_versions
     76 

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\sklearn\base.py in <module>
     18 
     19 from . import __version__
---> 20 from .utils import _IS_32BIT
     21 
     22 _DEFAULT_TAGS = {

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\sklearn\utils\__init__.py in <module>
     23 from ..exceptions import DataConversionWarning
     24 from .deprecation import deprecated
---> 25 from .fixes import np_version
     26 from .validation import (as_float_array,
     27                          assert_all_finite,

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\sklearn\utils\fixes.py in <module>
     16 import scipy.sparse as sp
     17 import scipy
---> 18 import scipy.stats
     19 from scipy.sparse.linalg import lsqr as sparse_lsqr  # noqa
     20 

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\stats\__init__.py in <module>
    377 from __future__ import division, print_function, absolute_import
    378 
--> 379 from .stats import *
    380 from .distributions import *
    381 from .morestats import *

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\stats\stats.py in <module>
    180 import scipy.special as special
    181 from scipy import linalg
--> 182 from . import distributions
    183 from . import mstats_basic
    184 from ._stats_mstats_common import (_find_repeats, linregress, theilslopes,

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\stats\distributions.py in <module>
      8 from __future__ import division, print_function, absolute_import
      9 
---> 10 from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,
     11                                     rv_frozen)
     12 

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\stats\_distn_infrastructure.py in <module>
     22 
     23 # for root finding for discrete distribution ppf, and max likelihood estimation
---> 24 from scipy import optimize
     25 
     26 # for functions of continuous distributions (e.g. moments, entropy, cdf)

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\optimize\__init__.py in <module>
    389 
    390 from .optimize import *
--> 391 from ._minimize import *
    392 from ._root import *
    393 from ._root_scalar import *

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\optimize\_minimize.py in <module>
     28 from ._trustregion_krylov import _minimize_trust_krylov
     29 from ._trustregion_exact import _minimize_trustregion_exact
---> 30 from ._trustregion_constr import _minimize_trustregion_constr
     31 
     32 # constrained minimization

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\optimize\_trustregion_constr\__init__.py in <module>
      2 
      3 
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
      5 
      6 __all__ = ['_minimize_trustregion_constr']

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py in <module>
      2 import time
      3 import numpy as np
----> 4 from scipy.sparse.linalg import LinearOperator
      5 from .._differentiable_functions import VectorFunction
      6 from .._constraints import (

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\sparse\linalg\__init__.py in <module>
    114 from .dsolve import *
    115 from .interface import *
--> 116 from .eigen import *
    117 from .matfuncs import *
    118 from ._onenormest import *

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\sparse\linalg\eigen\__init__.py in <module>
      9 from __future__ import division, print_function, absolute_import
     10 
---> 11 from .arpack import *
     12 from .lobpcg import *
     13 

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\sparse\linalg\eigen\arpack\__init__.py in <module>
     20 from __future__ import division, print_function, absolute_import
     21 
---> 22 from .arpack import *

C:\ProgramData\Anaconda3\envs\py36\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py in <module>
     43 __all__ = ['eigs', 'eigsh', 'svds', 'ArpackError', 'ArpackNoConvergence']
     44 
---> 45 from . import _arpack
     46 import numpy as np
     47 import warnings

ImportError: DLL load failed: The specified procedure could not be found.

0 个答案:

没有答案