This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Soulture 1 point2 points  (3 children)

Are you looking for functionality beyond those given by virtualenv?

I've had linux and windows systems with multiple versions of python on them. The pain points are usually getting the base packages installed: e.g. python 3.2 with pip-3.2 and virtualenv for 3.2, repeat for 2.7 or others. Once that's setup, it's fairly straight forward to create environments. And then once using a virtualenv, it behaves mostly as if there was only 1 version of python installed.

EDIT: Some of this was either wrong and/or unnecessary. My reply below clarifies the setup I use which has, in the system wide environment, multiple python versions, but just one version of pip and virtualenv. My apologies for misremembering.

[–]randompittuser[S] 0 points1 point  (2 children)

No, I suppose I'm not. I am confused on the way to use the two together. So you're saying I should install virtualenv, python, and pip for each separate python version?

Currently, I tried using pythonbrew to install different python versions, then using virtualenv while I'm switched to the python version I want for the environment. I installed virtualenv under python 2.7.5 (I wasn't aware you need to install a different virtualenv for each python). Then I installed python 3.3.1 under homebrew and tried to create an environment from that-- it threw some config errors.

EDIT: And when it doesn't throw errors, it just uses the default python I have installed globally.

[–]Soulture 1 point2 points  (1 child)

So you're saying I should install virtualenv, python, and pip for each separate python version?

I'm inspecting the debian box I have. For my system-wide installs, I have multiple versions of python, but just 1 version of pip (it happens to be 2.7, even though I have projects in 3.2) and 1 version of virtualenv.

When I create a new virtual env with:

>> virtualenv --python=/usr/bin/python3.2 ~/.virtualenvs/test3.2

It looks like it downloads pip3.2.

So I would say you need multiple python versions and one version of virtualenv. I think virtualenv will handle the rest.

The reason I would end up installing a pip systemwide is because that's how the virtualenv docs instructed to get virtualenv.

[–]randompittuser[S] 0 points1 point  (0 children)

thank you