Learning Python
A good resource is Python 2 at http://diveintopython.org/ by Mark.P and his new book on Python 3 http://diveintopython3.org/ . Python is a young but largely stable language for desktop and web application development. Its a good language for prototyping as its quick to develop with.
Micro Framework
The new generation of framework favours microframeworks such as http://flask.pocoo.org/ or http://bottlepy.org/docs/dev/
Get developing in minutes using microframeworks which is part of future of cloud computing.
Installing Python
The quickest way to install python in Mac with a few clicks is Enthought (http://www.enthought.com/). If you are academic or have a academic email, you can apply for a free enthought full version. Its a quick simple way to get a python installation up and running. On the forums and speaking to people, many dislike enthought for its rigidness. If you are new to python, I recommend using it just to get an idea. When you are familar, switch back to another package of python such as vanilla version of python or portablepython (http://www.portablepython.com/).
If you are using Mac, chances are you have python already running. To test just use terminal (application > terminal) in type:
> python
You can visit python.org for the newest python package (http://www.python.org/). I recommend the 2.x.x series as opposed to the 3.x.x version, for the time being.
Using Homebrew
Few days ago, I came across Homebrew http://mxcl.github.com/homebrew/ . Its a brilliant package manager for applications if you are using Mac. Think of it like the installed programs application on windows which provide uninstallers.
So why did I mention homebrew? Install python with homebrew is probably one of the greatest things i did last year. It manages python installs cleanly and you can install applications alongside python without much problems.
Installing a package manager
After installing, you can install setuptools. using the following. Setuptools / Pip / Distribute and Easy_install are all installation package managers. They make sure your python extensions are easy to add and manage. Setuptools and Easy_install are from older generation and Pip / Distribute are newer. All python extensions (at least official ones) are managed in pypi (http://pypi.python.org/pypi). Others prefer to install via url using CURL (http://curl.haxx.se/)
> sudo easy_install setuptools
> sudo easy_install pip
and use freeze to see the installed packages in your python
> pip freeze
Installing Scientific packages
The pain of installing matplotlib on macOSX has led to many debates. Apparently the problem lies on matplotlib releases only 32bit installation versions for MacOSX (Snow Leopard / Mountain Lion) where both the normal releases have 64bit python installations. This makes it unusable.
Quickest and easiest method is from enthought. http://www.enthought.com/products/epd.php
here is a good reference: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/#numpy
Adding PyDev on Aptana
- goto help->software updates-> find and install
- add a new remote site
- put in “http://pydev.sourceforge.net/updates”
- after installation goto window->preferences
- navigate to pydev->interpreter – pydev
- add in the new python location -> library->frameworks->python.framework->versions->2.6->bin->python
- highlight the newly added component on the top window then click okay. <gives you an error if you do not highlight it.
Reference
- http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/#lion