Pages

Showing posts with label virtualenv. Show all posts
Showing posts with label virtualenv. Show all posts

June 1, 2014

Python development environment setup in Ubuntu 14.04 LTS

After 100 days of using the Antergos Gnome 3 distribution as my main OS, I've decided to distro-hop again and try out the new Ubuntu 14.04 LTS (which I just recently installed).

A little bit over a month ago, I landed a job as a (probationary) web developer at a local web development shop. My tasks there consists mostly of Python/Django development. And so I can now say that I am professionally doing Python/Django development (yey!). I learned from my mentors at work on how to manage my development environment efficiently. I did know about virtualenv prior to landing that job, but I learned about virtualenvwrapper and how it augments usage of Python virtual environments on the job.

This post are just my notes on how I setup virtualenvwrapper on my Ubuntu 14.04 LTS box.

February 12, 2014

Virtual Environments for Python

I dabble with Python programming every now and then. Nothing serious, just casual n00bz stuff. Along the way, I stumbled across virtualenv. In a nutshell, it's a tool to create isolated Python environments. Python, like most programming languages, have 3rd-party modules (or libraries) that can be installed and used within your very own projects. Using pip makes it easy to do (granting pip is installed on your system).

Installing 3rd-party modules directly onto your bare-metal system may be fine for most cases, so you might be thinking why isolated Python environments? Well, if you're like me, I prefer to alter my base system as less as possible in terms of installed software. But from the top of my head, here are some reasons to consider using virtualenv.

  1. You don't have root privileges in your current system to issue a sudo pip install module command
  2. You work with a lot of Python projects that use different combinations of 3rd-party modules
  3. You are concerned that installing all 3rd-party modules may cause conflicts with each other
  4. You are OCD, like I am
  5. You like anything "virtual"...

The first 3 reasons could be valid...the last 2 can be ignored. Anyway, here's a use-case to illustrate my workflow.