[Distutils] using pip to install an specific, older version
Carl Meyer
carl at oddbird.net
Wed Apr 4 22:13:19 CEST 2012
Hi Chris,
On 04/04/2012 02:10 PM, Chris Jerdonek wrote:
> On Mon, Apr 2, 2012 at 12:08 PM, Carl Meyer <carl at oddbird.net> wrote:
>> Also, you may want to be aware that the -E flag is deprecated and is
>> already removed in the latest pip release (1.1) because it does not
>> handle isolated virtualenvs correctly. Instead, create a virtualenv and
>> use the pip that is automatically installed inside it (virtualenv
>> path/to/venv && path/to/venv/bin/pip install simplejson).
>
> With regard to the above, if the recommended way to use pip is to use
> it after calling virtualenv, then what is the recommended way to
> invoke/install virtualenv for use from a global Python (e.g. from a
> Python 3.2 installed via MacPorts). Before, I would have installed
> virtualenv by invoking pip with the -E flag. But by the above that
> approach is deprecated.
You can just "pip install virtualenv" (or easy_install virtualenv) into
your Python 3.2 install, which will make the "virtualenv" script
available. Or you can just download the virtualenv.py file from GitHub,
and run it via "python virtualenv.py" - it runs fine standalone.
> Also, does it matter whether virtualenv is run from Python 2 or Python
> 3? In particular, can virtualenv run from both Python 2.x and Python
> 3.x create virtual environments based on both Python 2.x and Python
> 3.x?
You can run virtualenv under either 2.x or 3.x, and create virtualenvs
for any Python version by using the --python flag to point to the Python
binary you want the new virtualenv to use. So you only need one
installation/copy of virtualenv on your system.
Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120404/20163983/attachment.pgp>
More information about the Distutils-SIG
mailing list