Python 3 is here, and we are all friends. Anyway, using it needs a bit of macumba-powers. Let’s acquire this power together…
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 http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
$ curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py
$ python get-pip.py
$ curl -O http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.tar.gz
$ tar xzvf virtualenv-1.6.tar.gz
$ cd virtualenv-1.6 && python setup.py 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.