【发布时间】:2014-08-28 05:49:48
【问题描述】:
我正在尝试使用数据表示服务 (BigML),该服务向其客户提供 REST 样式的 API。我必须使用 Python 2.7 使用这个 API,为了安装它,我需要 pip。但是,即使在过去 3 小时内测试了该网站的解决方案后,我似乎也无法在我的一生中正确安装 pip。所以这就是我到目前为止所尝试的......
1.) 我按照此页面上的说明进行操作:https://pip.pypa.io/en/latest/installing.html。下载“get-pip.py”文件并运行$ python "desktop/get-pip.py"。我得到这个结果:
Downloading/unpacking pip
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pip
Cleaning up...
No distributions at all found for pip
Storing debug log for failure in /Users/user/.pip/pip.log
如果有用,这里是错误日志:
desktop/get-pip.py run on Mon Jul 7 12:21:14 2014
Downloading/unpacking pip
Getting page https://pypi.python.org/simple/pip/
Could not fetch URL https://pypi.python.org/simple/pip/: connection error: [Errno 1] _ ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/ (Caused by <class 'httplib.CannotSendRequest'>: )
Will skip URL https://pypi.python.org/simple/ when looking for download links for pip
Cannot fetch index base URL https://pypi.python.org/simple/
URLs to search for versions for pip:
* https://pypi.python.org/simple/pip/
Getting page https://pypi.python.org/simple/pip/
Could not fetch URL https://pypi.python.org/simple/pip/: connection error: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip
Could not find any downloads that satisfy the requirement pip
Cleaning up...
Removing temporary dir /private/var/folders/7t/dnjmslbd0jn2s5wbgj1tnsjc0000gn/T/pip_build_user...
No distributions at all found for pip
Exception information:
Traceback (most recent call last):
File "/var/folders/7t/dnjmslbd0jn2s5wbgj1tnsjc0000gn/T/tmpU5dERi/pip.zip/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/var/folders/7t/dnjmslbd0jn2s5wbgj1tnsjc0000gn/T/tmpU5dERi/pip.zip/pip/commands/install.py" , line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/var/folders/7t/dnjmslbd0jn2s5wbgj1tnsjc0000gn/T/tmpU5dERi/pip.zip/pip/req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/var/folders/7t/dnjmslbd0jn2s5wbgj1tnsjc0000gn/T/tmpU5dERi/pip.zip/pip/index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for pip
2.) 我尝试sudo easy_install pip 并收到以下错误消息:
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: '/Library/Python/2.7/site-packages/test-easy-install-30930.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
3.) 然后我尝试下载 Python 3.4.1,因为 pip 附带了它,我想我只是想看看我是否可以使用它并希望没有不兼容性,但即便如此,当我运行 pip help is 表示找不到该命令。
4.) 我尝试弄乱代理,以及我在对同一问题的其他回复中发现的许多其他随机终端命令。似乎没有任何效果。
如果您不知道,我在这种终端/Unix-ish 类型的环境中不是很有经验,所以我非常感谢您对这个问题的任何见解。非常感谢!
【问题讨论】:
标签: python macos python-2.7 terminal pip