gpt4 book ai didi

python-3.x - 从 sklearn 导入数据集时出错

转载 作者:行者123 更新时间:2023-11-30 09:51:44 26 4
gpt4 key购买 nike

import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn import svm

它给出了以下错误-

Traceback (most recent call last):
File "/home/songoku/PycharmProjects/untitled/sklearn.py", line 4, in <module>
from sklearn import datasets
File "/home/songoku/PycharmProjects/untitled/sklearn.py", line 4, in <module>
from sklearn import datasets
ImportError: cannot import name 'datasets'

最佳答案

/home/songoku/PycharmProjects/untitled/sklearn.py 重命名为与 SKLearn 模块名称不同的名称:sklearn.py

关于python-3.x - 从 sklearn 导入数据集时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43951995/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com