无法在virtualenv中安装较旧的wxPython(无法解压缩文件/无法确定存档格式) [英] Unable to install older wxPython within virtualenv (Cannot unpack file / Cannot determine archive format)

查看:190
本文介绍了无法在virtualenv中安装较旧的wxPython(无法解压缩文件/无法确定存档格式)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python 2.6.6构建的virtualenv内,我正在尝试pip install找到 2.8.10.1 2.6 unicode dmg

Within a virtualenv built off Python 2.6.6, I'm trying to pip install the 2.8.10.1 2.6 unicode dmg found here thus:

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确实有点猜测.

Granted, the URL is a bit of a guess.

我得到了(将日志一分为二):

I get (dividing the log in two):

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是否存在错误"重要吗?

Is "There was an error checking the latest version of pip" significant?

pip是virtualenv自己的:

pip is the virtualenv's own:

/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)

推荐答案

我认为错误检查版本对您的问题不重要(这只是尝试自我更新的点子),但它导致了错误.也许旧版本的Python不支持所需的SSL设置?您可以使用以下方式禁用此更新检查:

I don't think the error checking version is significant to your problem (this is just pip trying to update itself) but it is causing the error. Perhaps the older version of Python doesn't support the required SSL settings? You can disable this update check using:

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

这篇关于无法在virtualenv中安装较旧的wxPython(无法解压缩文件/无法确定存档格式)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆