安装OpenVINO时执行./demo_squeezenet_download_convert_run.sh显示Download Failed的解决方法

1. 问题描述:

我不管是在linux系统还是windows10系统下按照官方指南安装OpenVINO时,执行./demo_squeezenet_download_convert_run.sh这一步总是报错:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘raw.githubusercontent.com’, port=443): Max retries exceeded with url: /forresti/SqueezeNet/a47b6f13d30985279789d08053d37013d67d131b/SqueezeNet_v1.1/deploy.prototxt (Caused by NewConnectionError(’: Failed to establish a new connection: [Errno 111] Connection refused’,))
########## Error: Download failed

看上去就是网络连接不上的问题.纠结两天过后终于找到了解决办法!

2.解决方法

从报错中可以看出是连接raw.githubusercontent.com时连接不上的问题,改变搜索思路,于是查到了这个博客:解决GitHub的raw.githubusercontent.com无法连接问题
,按照他的解决方法就可以成功解决问题.具体方法如下:

(1)在网址:https://site.ip138.com/raw.Githubusercontent.com/
中输入raw.githubusercontent.com可以查询ip地址

(2)在终端输入:sudo gedit /etc/hosts

(3)在文件末尾添加以下内容:(具体ip地址根据以上网址查询为准)

# GitHub Start
52.74.223.119 github.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
151.101.76.133 raw.githubusercontent.com
151.101.108.133 user-images.githubusercontent.com
151.101.76.133 gist.githubusercontent.com
151.101.76.133 cloud.githubusercontent.com
151.101.76.133 camo.githubusercontent.com
151.101.76.133 avatars0.githubusercontent.com
151.101.76.133 avatars1.githubusercontent.com
151.101.76.133 avatars2.githubusercontent.com
151.101.76.133 avatars3.githubusercontent.com
151.101.76.133 avatars4.githubusercontent.com
151.101.76.133 avatars5.githubusercontent.com
151.101.76.133 avatars6.githubusercontent.com
151.101.76.133 avatars7.githubusercontent.com
151.101.76.133 avatars8.githubusercontent.com
# GitHub End

(4)保存文件.

再次运行./demo_squeezenet_download_convert_run.sh就可以成功啦.

你可能感兴趣的:(Ubuntu)