Python 3 Survival Guide

Python 3 is here, and  we are all friends. Anyway, using it needs a bit of macumba-powers. Let’s acquire this power together…

Do we love python3?... mmm we prefer 2.6 for the meantime
Python 3 adoption is still slow; some of the new feature are very well described by this presentation which is about three years old but still stand.

We show here a way to install python 3.2 without overwriting your python 2.x installation. On our system (cygwin+python) python 2.x will remain the default.

First of all, download python 3.2 as window package and install it.

After installing Python 3.2 you will need pip, the brand new replacement of easy_install.  Getting it requires distribute too, so issue:
$ curl -O
$ python
$ curl -O
$ python
$ curl -O
$ tar xzvf virtualenv-1.6.tar.gz
$ cd virtualenv-1.6 && python install && cd ..
$ virtualenv –distribute c:/giorgi/python3EnvDev
Then do a small check:
[bash]$ which pip /cygdrive/c/Python32/Scripts/pip
To install a  minimal working subsystem, after activating your virtual env try:
[bash]pip install nose six cherrypy

Python 3 package list is still small compared to Python 2.x codebase. Anyway, moving to python 3 is not a pain if you know how to start. If you need complex stuff like Gevent you still must stick with 2.x snakes, but the conversion tool do a lot of good work.



Pip page

One Reply to “Python 3 Survival Guide”

Leave a Reply