权限错误,pip-ins

2024-06-26 10:16:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚开始使用fedora的一个新版本,我正在尝试pip安装pew,这样我就可以在一些虚拟python环境中工作了。在

pip的安装是正确的,至少我认为是这样。在

>>> pip -V
pip 7.1.0 from /usr/lib/python2.7/site-packages (python 2.7)

我知道这个版本有点过时了,但我至少有个点子。当我试图抓住皮尤时,就会发生这种情况。在

^{pr2}$

在我看来,仅仅基于“拒绝许可”这一点,我应该这样做。在

sudo pip install pew

在问我密码后,我一遍又一遍地收到这条消息。在

Collecting pew
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known'))': /simple/pew/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known'))': /simple/pew/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known'))': /simple/pew/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-2, 'Name or service not known'))': /simple/pew/

etc...

有人能帮我弄清楚如何在我的新fedora版本上正确安装pip吗?在


Tags: pipnonereadbyconnectconnectionredirecttotal
1条回答
网友
1楼 · 发布于 2024-06-26 10:16:14

忘了我甚至问过这个问题,但我需要“sudo su”,因为我正试图将python包安装到需要root用户的地方。在

{my python用来管理更多的永久环境。在pew环境中,我将python包安装到不需要root用户的地方,问题就解决了。在

相关问题 更多 >