2016-01-16 11 views
1

在一個virtualenv建關的Python 2.6.6,我試圖pip install2.8.10.1 2.6 Unicode的 DMG發現here從而:無法的virtualenv中安裝舊的wxPython(無法解壓縮文件/無法確定歸檔格式)

pip install -Iv http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download 

當然,這個URL是有點猜測的。

我得到(將在日誌中二):

MacBook-Pro-de-Pyderman:Pyderman$ pip install -Iv http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download -U --trusted-host sourceforge.net 
Collecting http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download 
    Starting new HTTP connection (1): sourceforge.net 
    "GET /projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download HTTP/1.1" 302 519 
    Starting new HTTP connection (1): downloads.sourceforge.net 
    "GET /project/wxpython/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg?r=&ts=1452906240&use_mirror=superb-dca2 HTTP/1.1" 302 433 
    Starting new HTTP connection (1): superb-dca2.dl.sourceforge.net 
    "GET /project/wxpython/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg HTTP/1.1" 200 39136817 
    Downloading http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download (39.1MB) 
    Downloading from URL http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download 
    100% |████████████████████████████████| 39.1MB 1.9MB/s 
    Cannot unpack file /private/var/folders/t3/yhd5b6lj2cz_b82qzw4zcwh40000gn/T/pip-mLGthu-unpack/download.dmg (downloaded from /var/folders/t3/yhd5b6lj2cz_b82qzw4zcwh40000gn/T/pip-FRcExS-build, content-type: application/x-apple-diskimage); cannot detect archive format 
Cleaning up... 
Cannot determine archive format of /var/folders/t3/yhd5b6lj2cz_b82qzw4zcwh40000gn/T/pip-FRcExS-build 

-

Exception information:Pyderman 
Traceback (most recent call last): 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/basecommand.py", line 211, in main 
    status = self.run(options, args) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/commands/install.py", line 305, in run 
    wb.build(autobuilding=True) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/wheel.py", line 705, in build 
    self.requirement_set.prepare_files(self.finder) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/req/req_set.py", line 334, in prepare_files 
    functools.partial(self._prepare_file, finder)) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install 
    more_reqs = handler(req_to_install) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/req/req_set.py", line 491, in _prepare_file 
    session=self.session) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/download.py", line 825, in unpack_url 
    session, 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/download.py", line 677, in unpack_http_url 
    unpack_file(from_path, location, content_type, link) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/utils/__init__.py", line 665, in unpack_file 
    'Cannot determine archive format of %s' % location 
InstallationError: Cannot determine archive format of /var/folders/t3/yhd5b6lj2cz_b82qzw4zcwh40000gn/T/pip-FRcExS-build 
Starting new HTTPS connection (1): pypi.python.org 
/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. 
    InsecurePlatformWarning 
There was an error checking the latest version of pip 
Traceback (most recent call last): 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/utils/outdated.py", line 126, in pip_version_check 
    headers={"Accept": "application/json"}, 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/_vendor/requests/sessions.py", line 477, in get 
    return self.request('GET', url, **kwargs) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/download.py", line 373, in request 
    return super(PipSession, self).request(method, url, *args, **kwargs) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/_vendor/requests/sessions.py", line 465, in request 
    resp = self.send(prep, **send_kwargs) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/_vendor/requests/sessions.py", line 573, in send 
    r = adapter.send(request, **kwargs) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send 
    resp = super(CacheControlAdapter, self).send(request, **kw) 
    File "/Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-packages/pip/_vendor/requests/adapters.py", line 431, in send 
    raise SSLError(e, request=request) 
SSLError: [Errno 1] _ssl.c:490: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 

是 「有一個錯誤檢查最新版本PIP的」 顯著?

點子是的virtualenv自己:

/Users/Pyderman/Downloads/Pyderman/venv/bin/pip --version 
pip 7.1.2 from /Users/Pyderman/Downloads/Pyderman/venv/lib/python2.6/site-  
packages (python 2.6) 

回答

2

我不認爲有錯誤檢查的版本是你的問題顯著(這只是PIP試圖更新自己),但它導致錯誤。也許舊版本的Python不支持所需的SSL設置?您可以使用以下功能禁用此更新檢查:

pip install -Iv http://sourceforge.net/projects/wxpython/files/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg/download --disable-pip-version-check