Here's my go-to reference guide to using virtualenv and pip for django development[1]. The same steps apply to deployment, to some extent.
Additionally, I recommend you checkout virtualenvwrapper[2]. It makes your life incredibly easier and switching virtualenvs becomes as simple as typing 'workon my_virtualenv'. FWIW, I think this question is so often asked that it would be reasonable to add a couple of links to these guides on djangoproject.com (which I might preemptively add is not the same as endorsing this or that solution). Sincerely, André Terra [1] http://saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ [2] http://www.doughellmann.com/projects/virtualenvwrapper/ On Tue, May 24, 2011 at 10:59 AM, Shawn Milochik <sh...@milochik.com> wrote: > On 05/24/2011 09:53 AM, Brian Bouterse wrote: > >> Python is embedded so deeply into operating systems these days that not >> using virtualenv is a bad idea. Here is what happened to me once: >> >> 1. I went to pip intall a python package without virtualenv >> 2. The installation failed leaving my python system raising an >> interpreter error when going to run anything python >> 3. Everything on the system started breaking (yum, bash were the most >> noticible). >> 4. I really tried to recover the box by repairing python .... installing >> a newer version of python .... removing and reinstalling >> 5. Could not recover the linux system; it ended up being faster to >> rebuild it. >> >> Don't be like me and break your system by not using virtualenv. >> >> Brian >> > > To add to that, you can (and should) create each virtualenv with the > --no-site-packages option. That way, each virtualenv is isolated from > whatever stuff you have installed into the OS's default Python installation. > Further, I never install anything in the base Python installation. > > Not only do you get standalone virtualenvs for whatever purpose you like, > it also makes upgrading a lot easier. > > And an additional side note: If you are in a place (like a VPS) where you > have root access, you should install Python2.7 with configure, make, sudo > make altinstall. The altinstall will install Python2.7 on your system in an > alternate location, leaving the default version alone so everything else in > the OS continues to work. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.