urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>
具体代码
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
df=sns.load_dataset(‘iris’)
sns.boxplot(x=df[‘sepal_length’])
报错
urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>
解决方案
电脑配置的DNS不能使用了,只需修改DNS地址为114.114.114.114即可
修改DNS链接:https://jingyan.baidu.com/article/2c8c281d6170630008252afb.html
修改后又出现的问题
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主
解决方案
设置自己电脑的防火墙:windows->设置->windows安全中心->防火墙和网络保护->允许应用通过防火墙->更改设置