【问题标题】:ERROR:root:Internal Python error in the inspect module while importing sklearn错误:root:导入 sklearn 时检查模块中的内部 Python 错误
【发布时间】:2020-04-02 05:39:47
【问题描述】:

当我导入这些库时:

from sklearn.datasets.samples_generator import make_blobs
from sklearn.cluster import KMeans
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
from sklearn import metrics

出现此错误:

我已经安装了很多 sklearn 包,但没有任何改变 我使用 anaconda 并在 jupyter notebook 中运行此代码

【问题讨论】:

    标签: python scikit-learn anaconda jupyter


    【解决方案1】:

    我遇到了同样的问题,并为 Visual Studio 2015、2017 和 2019 安装了 Microsoft Visual C++ Redistributable,它工作正常!

    请注意,这涉及进入 Visual Studio 安装程序,选择“修改”,然后选择“使用 C++ 进行桌面开发”。

    我看到很多用户在 Github 上报告了这个问题。您可以简单地安装 tensorflow == 2.0.0 并卸载以前的版本。

    【讨论】:

      猜你喜欢
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 2012-07-14
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多