我在macOS Sierra上安装了Python 2.7。我无法安装任何Python包。
当我尝试pip install django -v
时:
Searching for virtualenv
Reading https://pypi.python.org/simple/virtualenv/
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/
No local packages or download links found for virtualenv
error: Could not find suitable distribution for Requirement.parse('virtualenv')
easy_install virtualenv -v
:
Searching for virtualenv
Reading https://pypi.python.org/simple/virtualenv/
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/
No local packages or download links found for virtualenv
error: Could not find suitable distribution for Requirement.parse('virtualenv')
我无法弄清楚Could not find suitable distribution for Requirement.parse('virtualenv')
试图说些什么。如何解决这个问题?
答案 0 :(得分:1)
如果你有一个网络,你可以尝试直接通过pip install virtualenv-15.2.0-py2.py3-none-any.whl
安装车轮文件。
然后pip install Django-1.11.12-py2.py3-none-any.whl
。
即:从提供的链接下载whl文件,然后在Download的文件夹中打开一个终端。然后输入命令“pip install ...
”。