尝试找出是否有一种方法可以避免在工作时安装软件包时使用--cert标志。代理存在一些问题,尽管将mycert.crt
文件添加到/usr/local/share/ca-certificates
并正在运行,但我仅在提供该标志时才允许我下载所需的软件包sudo update-ca-certificates
。
我看到的消息示例是:
$ pip install "virtualenv>=1.10.1"
Downloading/unpacking virtualenv>=1.10.1
Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
Will skip URL https://pypi.python.org/simple/virtualenv/ when looking for download links for virtualenv>=1.10.1
Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
Will skip URL https://pypi.python.org/simple/ when looking for download links for virtualenv>=1.10.1
Cannot fetch index base URL https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed>
Will skip URL https://pypi.python.org/simple/virtualenv/ when looking for download links for virtualenv>=1.10.1
Could not find any downloads that satisfy the requirement virtualenv>=1.10.1
Cleaning up...
No distributions at all found for virtualenv>=1.10.1
Storing complete log in /tmp/tmpwW5qXD
可以使用以下方法解决:
pip install --cert=/usr/local/share/ca-certificates/mycert.crt
但是,我希望不必这样做(因为我敢肯定其他应用程序也会遇到此问题)。
我正在运行Linux Mint 15(尽管以前在Ubuntu 12.04上有非常类似的问题),pip版本1.4.1。