> pip install yolk
Downloading/unpacking yolk
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement yolk
No distributions at all found for yolk
Storing complete log in /Users/harith/.pip/pip.log
当我读取文件时,我看到
> cat /Users/harith/.pip/pip.log
------------------------------------------------------------
/Users/harith/.shared/virtualenvs/pennytracker/bin/pip run on Mon Jul 1 20:26:02 2013
Downloading/unpacking yolk
Getting page https://pypi.python.org/simple/yolk/
Could not fetch URL https://pypi.python.org/simple/yolk/: HTTP Error 503: Service Unavailable
Will skip URL https://pypi.python.org/simple/yolk/ when looking for download links for yolk
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: HTTP Error 503: Service Unavailable
Will skip URL https://pypi.python.org/simple/ when looking for download links for yolk
Cannot fetch index base URL https://pypi.python.org/simple/
URLs to search for versions for yolk:
* https://pypi.python.org/simple/yolk/
Getting page https://pypi.python.org/simple/yolk/
Could not fetch URL https://pypi.python.org/simple/yolk/: HTTP Error 503: Service Unavailable
Will skip URL https://pypi.python.org/simple/yolk/ when looking for download links for yolk
Could not find any downloads that satisfy the requirement yolk
No distributions at all found for yolk
Exception information:
Traceback (most recent call last):
File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
status = self.run(options, args)
File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1026, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/index.py", line 171, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for yolk
我做错了什么吗?
这是因为在 pip 配置中,index-url 参数应指向新的 pypi 网址。更改~/.pip/pip.conf
中的文件,如果以 root 身份运行 pip,则更改/root/.pip/pip.conf
中的文件:/root/.pip/pip.conf`。
你可能有这样的文件
[global]
index-url=http://f.pypi.python.org/simple
您应该把它改成这个:
[global]
index-url=https://pypi.python.org/pypi/
然后就可以像以前一样工作了。 希望对您有所帮助。
解释就在你的日志中:
Could not fetch URL https://pypi.python.org/simple/yolk/: HTTP Error 503: Service Unavailable
请注意 "HTTP 错误 503:服务不可用"。看来在您尝试执行此操作时,网站已经关闭。
很高兴知道 HTTP 5xx 错误是服务器端错误,这样你就可以知道问题不在本地网络,而是在远程网络。
这意味着稍后再试一次;-)(手指交叉......)(顺便说一句,我现在能用了)。
pip 具有 镜像支持
pip --use-mirrors install yolk
从 1.5 版开始,此选项将被移除:
1.5 (未发布) >; BACKWARD INCOMPATIBLE pip 不再支持 --use-mirrors、-M、 和 --mirrors 标志。镜像支持已被移除。为了 要使用镜像,请使用 -i 或
--index-url 或使用 --extra-index-url 将其指定为主索引。(Pull #1098,CVE-2013-5123)。 >; BACKWARD INCOMPATIBLE pip 不再扫描不安全的外部 url 默认情况下也不会安装外部托管文件。 用户可以选择安装外部托管或不安全的文件或 用户可以使用 --allow-external PROJECT 和 --allow-insecure PROJECT 选择安装外部托管或不安全的文件或网址。 (Pull #1055) 增加了对.....; 为日志输出添加颜色,以引起对重要警告和错误的注意。 重要警告和错误。(Pull #1109) >; 在使用不安全的索引、查找链接或依赖关系时添加警告。 链接时的警告。(拉 #1121)