【发布时间】:2019-12-03 12:25:11
【问题描述】:
我在我的环境中安装了 sklearn,现在在 windows 上的 jupyter notebook 上运行它。
如何避免错误:
URLError: urlopen 错误 [Errno 11004] getaddrinfo 失败
我正在运行以下代码:
import sklearn
import sklearn.ensemble
import sklearn.metrics
from sklearn.datasets import fetch_20newsgroups
categories = ['alt.atheism', 'soc.religion.christian']
newsgroups_train = fetch_20newsgroups(subset='train', categories=categories)
在第 5 行给出错误:
----> 3 newsgroups_train = fetch_20newsgroups(subset='train', categories=categories)
我在我的工作计算机上使用代理,是否有任何选项可以避免此错误并能够使用示例数据集?
【问题讨论】:
标签: python scikit-learn