请检查下你的地址是否能正常访问
from urllib.request import urlopen url = 'https://www.baidu.com' resp = urlopen(url) print(resp.read())