如何强制virtualenv从pypi安装最新的setuptools和pip? [英] How to force virtualenv to install latest setuptools and pip from pypi?

查看:110
本文介绍了如何强制virtualenv从pypi安装最新的setuptools和pip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以强制virtualenv使用pypi提供的最新setuptools和pip?本质上,我正在寻找--never-download标志的 相反 .

Is it possible to force virtualenv to use the latest setuptools and pip available from pypi? Essentially, I'm looking for the opposite of the --never-download flag.

当前,当我制作一个新的virtualenv时,它使用与virtualenv捆绑在一起的本地(旧)版本.

Currently, when I make a new virtualenv, it uses the local (old) versions that come bundled with virtualenv.

$ v.mk testvenv
New python executable in testvenv/bin/python
Installing setuptools............done.
Installing pip...............done.
$ pip show setuptools
---
Name: setuptools
Version: 0.6c11
Location: /Users/cwilson/.virtualenvs/testvenv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
Requires: 
$ pip search setuptools
[...]
setuptools                - Easily download, build, install, upgrade, and
                            uninstall Python packages
INSTALLED: 0.6c11
LATEST:    0.7.2
[...]

推荐答案

出于安全原因不支持.

将virtualenv.py用作隔离脚本(即没有关联的脚本) 出于安全考虑,不再支持virtualenv_support目录) 原因,并会因错误而失败.除此之外,--never-download 现在始终固定为True,并且仅在 向后兼容性的短期期限(Pull#412).

Using virtualenv.py as an isolated script (i.e. without an associated virtualenv_support directory) is no longer supported for security reasons and will fail with an error. Along with this, --never-download is now always pinned to True, and is only being maintained in the short term for backward compatibility (Pull #412).

我也不能使用--extra-search-dir选项,因为它当前已损坏 https://github.com/pypa/virtualenv/issues/327

I can't use the --extra-search-dir option either because it's currently broken https://github.com/pypa/virtualenv/issues/327

看起来唯一的选择就是仅等待virtualenv维护者更新捆绑的软件包?

Looks like the only option is to simply wait for the virtualenv maintainers to update the bundled packages?

这篇关于如何强制virtualenv从pypi安装最新的setuptools和pip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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