首页 > 解决方案 > pip install django-import-export 读取超时

问题描述

我正在尝试使用 django-import-export 用 excel 文件填充我的模型。但是,当我这样做时pip install django-import-export,我收到以下错误

C:\Users\Billy Somers\webapps>pip install django-import-export
Collecting django-import-export
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/django-import-export/
Retrying (Retry(total=3, 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/django-import-export/
Retrying (Retry(total=2, 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/django-import-export/
Retrying (Retry(total=1, 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/django-import-export/
Retrying (Retry(total=0, 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/django-import-export/
Could not find a version that satisfies the requirement django-import-export 
(from versions: )
No matching distribution found for django-import-export

我该如何解决这个问题?

标签: pythondjango

解决方案


检查您是否能够通过 https 从浏览器访问 pypi.org。还要检查防火墙级别是否有任何端口阻塞。

如果这不起作用升级 pip 版本,然后尝试安装。请检查 pypi 是否存在此分布。


推荐阅读