Manage python version in different virtualenv with pythonbrew -



Manage python version in different virtualenv with pythonbrew -

my main scheme python version 2.7.3. i'm trying create virtualenv uses version 3.3.0. installed pythonbrew, virtualenv , virtualenvwrapper.

i followed tutorial: http://technomilk.wordpress.com/2011/07/27/setting-up-our-django-site-environment-with-pythonbrew-and-virtualenv/

which runs pythonbrew utilize 3.3.0, , create virtualenv. tutorial says virtualenv utilize version pythonbrew uses. doesn't. virtualenv uses 2.7.3 when start it. when pythonbrew utilize 3.3.0, leaves virtualenv , applies scheme instead of environment.

apparently, pythonbrew has own virtualenv wrapper, has tutorial at: http://suvashthapaliya.com/blog/2012/01/sandboxed-python-virtual-environments/

i hate doing though. possible utilize virtualenvwrapper along pythonbrew (and not pythonbrew's venv wrapper) able take python version utilize each venv, , maintain them separate scheme python version?

also, not want utilize mkvirtualenv -p flag, means need manually install python3.3. i'd rather stick using bundle manager manage python versions. it's hard believe nil in python equates rvm in ruby... unless i'm mistaken?

maybe should http://pypi.python.org/pypi/pythonbrew/ instead. when did it, used pythonbrew create venv

pythonbrew install 2.7.3 pythonbrew switch 2.7.3 pythonbrew venv create proj

worked champ.

i've taken creating virtual environments in .folder underneath git repo can dispose of virtual environment without messing code , rebuild if desire. bumped technique while working jenkins git clone you, have figure out how build virtual environment around it.

python/proj .proj <---- virtual environment in here! lib site-packages settings requirements apps

i have bash function workon me.

function workon() { if [ -d ~/python/$1 ] cd ~/python/$1 if [ -d .$1 ] . .${1}/bin/activate else . bin/activate cd $1 fi fi }

this 1 overly complicated deal old projects clone done within virtual environment new ones virtual environment within project.

python virtualenv virtualenvwrapper pythonbrew

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -