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.
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
[...]
It's not supported for security reasons.
I can't use the
--extra-search-dir
option either because it's currently broken https://github.com/pypa/virtualenv/issues/327Looks like the only option is to simply wait for the virtualenv maintainers to update the bundled packages?
I needed the latest setuptools library, and the
--extra-search-dir
flag wasn't working for me (even though it's been fixed apparently).However, making a virtualenv without setuptools and then installing directly from PyPi worked great. E.g. to set up a virtualenv called
test
:Testing with
shows the right version.
You can upgrade pip after installing your virtualenv by using
pip install -U pip
.I'm sure you could write a bootstrap-script to automate this step.
I ran into the same problem, and I fixed it by upgrading
setuptools
.If
env
is your virtual env, run the following:$ env/bin/pip install --upgrade setuptools
Building on ematsen's excellent answer I made a bash script that works with virtualenvwrapper