Python 3 virtualenvs

Jon Ribbens jon+usenet at unequivocal.co.uk
Sat Nov 28 16:48:37 EST 2015


On 2015-11-28, D.M. Procida <real-not-anti-spam-address at apple-juice.co.uk> wrote:
> Jon Ribbens <jon+usenet at unequivocal.co.uk> wrote:
>
>> On 2015-11-28, D.M. Procida <real-not-anti-spam-address at apple-juice.co.uk>
> wrote:
>> > I have a new installation of Debian Jessie, with Python 2.7 and 3.4
>> > installed.
>> >
>> > I want to use Python 3.4 by default for most things, so I want
>> > virtualenv to create Python 3.4 virtualenvs unless I ask it to
>> > otherwise.
>> >
>> > It turns out that this seems to be inordinately complex.
>> 
>> sudo apt-get remove python-virtualenv
>> sudo apt-get install python3-virtualenv
>
> Yup, I did try installing python3-virtualenv, but it didn't appear
> actually do do anything. It didn't provide me with a virtualenv command,
> that's for sure.
>
> And pages such as https://packages.debian.org/jessie/python3-virtualenv
> are not exactly informative.
>
> Is something else required?

Hmm. Well basically the answer to your question is that you want
virtualenv to be installed by Python 3, then it will default to using
it. Debian's package management is mysterious and apparently bizarre
and frankly in respect to Python, not very good. So perhaps the best
thing to do is simply ignore it and install virtualenv yourself with:

  sudo apt-get install python3-pip
  sudo pip3 install virtualenv

... although you might want to install pip manually too.



More information about the Python-list mailing list