# Getting Setup with Python

DevFeed: [Getting Setup with Python](<https://devfeed.tech/articles/getting-setup-with-python-41101.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2011/10/27/Getting-Setup-with-Python/>)

Author: Map

Published: 2011-10-28T03:55:56Z

Content type: tutorial

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Homebrew](<https://devfeed.tech/topics/homebrew.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [getting-started](<https://devfeed.tech/tags/getting-started.md>), [guide](<https://devfeed.tech/tags/guide.md>), [homebrew](<https://devfeed.tech/tags/homebrew.md>), [install](<https://devfeed.tech/tags/install.md>), [linux](<https://devfeed.tech/tags/linux.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [python](<https://devfeed.tech/tags/python.md>), [setup](<https://devfeed.tech/tags/setup.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>), [version](<https://devfeed.tech/tags/version.md>)

## AI overview

A beginner tutorial on setting up a Python project environment using virtualenv, with PostgreSQL installation instructions for macOS and Linux. It also covers platform-specific use of Homebrew and apt.

## Source excerpt

This is the first of a multipart series to getting started with Python. Throughout this guide we'll walk you through a full setup. For starters if you're a mac or linux user you already have Python on your system. You should be able to confirm you have python my opening up a terminal window and running: $ python --version Python 2.7.2 As long as you see a Python version 2.5.x-2.7.x you should be fine to continue. From here we're going to work through setting up your Python project environment. For this we're going to use virtualenv. For those of you not familiar virtualenv is a self-contained python environment. It holds its own copy of python and any libraries you install. This allows you to work on multiple projects with different versions of libraries. While we're installing virtualenv we're also going to go ahead and setup PostgreSQL as we'll be using it later. If you're on a mac you'll first need to setup homebrew. Homebrew is used for installing various system packages. If you're on linux, in particular Ubuntu you can skip down to the steps for setting up your environment. First for Mac users lets setup homebrew which will allow us to install various system packages: $ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" $ curl -O http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg | sh setuptools-0.6c11-py2.7.egg $ easy_install virtualenv $ brew install postgresql $ sudo apt-get install virtualenv $ sudo apt-get install postgresql Now you have Python, virtualenv, and postgresql all installed. We can now focus on setting up the initial start to a project. In the next part we can start with installing some Python packages.