我正在公司的服务器上工作,并且pip安装或easy_install无法正常工作。我无法安装virtualenv。这是easy_install的结果:

PS C:\> easy_install virtualenv
Searching for virtualenv
Reading https://pypi.python.org/simple/virtualenv/
Download error on https://pypi.python.org/simple/virtualenv/: [Errno 11001] getaddrinfo failed -- Some packages may not
be found!
Couldn't find index page for 'virtualenv' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 11001] getaddrinfo failed -- Some packages may not be found!
No local packages or working download links found for virtualenv
error: Could not find suitable distribution for Requirement.parse('virtualenv')
PS C:\>


这是我运行pip install命令时得到的:

PS C:\> pip install virtualenv
Collecting virtualenv
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pi
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03600ED0>: Failed to establish a new
onnection: [Errno 11001] getaddrinfo failed',)': /simple/virtualenv/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pi
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03600E10>: Failed to establish a new
onnection: [Errno 11001] getaddrinfo failed',)': /simple/virtualenv/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pi
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03600FF0>: Failed to establish a new
onnection: [Errno 11001] getaddrinfo failed',)': /simple/virtualenv/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pi
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03600F70>: Failed to establish a new
onnection: [Errno 11001] getaddrinfo failed',)': /simple/virtualenv/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pi
._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03600EB0>: Failed to establish a new
onnection: [Errno 11001] getaddrinfo failed',)': /simple/virtualenv/
  Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv


我是django的新手,无法解决问题。因此,请帮助我解决此问题。

最佳答案

https://www.lfd.uci.edu/~gohlke/pythonlibs/

转到此链接并搜索virtualenv并从downloads文件夹下载正确的wheel文件和

使用pip install the_wheel_name

关于python - Easy_install virtualenv/Pip安装virtualenv-不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47767236/

10-15 05:19