安装包装时如何解决pip错误?

时间:2019-04-09 13:07:20

标签: python pip install

我想在pip上安装软件包,但发生此错误:

C:\Users\Mina>pip install sklearn

Collecting sklearn
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/sklearn/
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/sklearn/
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/sklearn/
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/sklearn/
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/sklearn/

Could not find a version that satisfies the requirement sklearn (from 
versions: )
No matching distribution found for sklearn

此错误似乎表明安装了所有软件包。

注意:我不想在conda上安装。

如果您引导我,我将不胜感激。

最好的问候, 米娜

2 个答案:

答案 0 :(得分:3)

如果您在pypi中选中sklearn,则会告诉您改用scikit-learn

尝试:pip install -U scikit-learn

答案 1 :(得分:1)

您可以从sklearn git下载sklearn软件包的源代码。下载适当的版本。

下载后,运行python setup.py install安装软件包

相关问题