模块导入超时解决办法
这也是继上一篇内容进行一些补充,在导入keras模块时,不论是pycharm还是终端,都会出现连接超时的报错
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘pypi.org’, port=443): Read timed out. (read timeout=15)”,)’: /simple/certifi/
这里,我通过查找,发现了通过终端延时pip下载时间的命令,这样可以很大概率的下载成功(当然,也会出现连接超时的情况)
pip --default-timeout=100 install -U pip
下图是测试keras和tensorflow
anaconda
在tensorflow安装之前,尽量把anaconda先安装上,里面有很多tensorflow所依赖的包。
ps:因为网络问题,所以我就不把安装图片往上发啦。