I have python2.6 and django1.2.3 already installed on my system (Ubuntu 10.x).
This is the setup i use for most of my projects. But for some projects I need sandboxed environments, different django version, some extra python modules and sometimes even different python version.
So, I am trying to use pip and virtualenv now,but I am unable to change python and django version. Will I have to remove default setup and move all existing projects into 1 virtualenv. Can I avoid this? Even if I do that, how can I specify a different version of python?
If I have to remove the old settings. How do i do that? I have currently most of the things installed in /usr/local/lib/python2.6/dist-packages/
but I am not sure if there is anything installed anywhere else also.
If I have a completely blank setup with just Ubuntu, what is the ideal workflow? Is it this one?
Install python
$ sudo apt-get install python-setuptools
$ sudo apt-get install python-virtualenv
$ sudo easy_install pip
$ sudo pip install virtualenvwrapper
You want to do:
virtualenv --python=/path/to/python/version --no-site-packages ENV_NAME
For example:
virtualenv --python=/usr/bin/python2.6 --no-site-packages my_project_env
If you follow this for your projects you should be able to have a separate configuration for each one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With