Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Basics Say Hello to Django Django?

Python Version Support

I'm trying to make a blog using a Django tutorial, but I noticed that my hosting provider, namescheap, mentions support for Python 2.6 as the latest version. Does that mean I'll have to develop the blog in a Python 2.6 workspace? Also, is it possible to update my server with one of the more recent versions of Python environments, or is that something limited by hosting providers?

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 68,423 Points

Send their support team a message asking to them to support Python 2.7. With enough prodding they may update. Python 2.6.9, released Oct 2013, is old. Python 2.7 has been out since July 2010, with 2.7.9 out December 2014, and the latest 2.7.10 released in May 2015!

Python can run from any directory. If you have write permissions, you may install it in a local directory if needed, or in a virtualenv directory.

To uses Django 1.8 or 1.9, Python 2.7 is required. Django 1.7 is no longer supported.

To install python locally you can:

# Install Python as ~/local/bin/python2.7
# create local installed directory
$ cd ~
$ mkdir local

# create local directory for the source
$ cd ~
$ mkdir src
$ cd src

#  Fetch, extract, compile, and install the Python 2.7.10 source code:
$ wget http://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
$ tar -xzvf Python-2.7.10.tgz
$ cd Python-2.7.10
$ ./configure -prefix=/home/<username>/local
$ make
$ make install

# view installed directory
$ ls ~/local/bin
2to3  pydoc   python2    python2.7-config  python-config
idle  python  python2.7  python2-config    smtpd.py

# Add your local bin to the path (add to .bashrc or equivalent)
$ PATH="/home/<username>/local/bin:$PATH"