| | 1 | == Install Python == |
| | 2 | |
| | 3 | 1. You will propably need the GIS features of Eden. Before you proceed install the GDAL framework |
| | 4 | * http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries |
| | 5 | |
| | 6 | 2. You also need to install some modules of python |
| | 7 | {{{ |
| | 8 | STATIC_DEPS=true sudo easy_install lxml |
| | 9 | sudo easy_install shapely |
| | 10 | sudo easy_install reportlab |
| | 11 | sudo easy_install xlwt |
| | 12 | sudo easy_install pyserial |
| | 13 | sudo easy_install tweepy |
| | 14 | }}} |
| | 15 | |
| | 16 | 3.In case you want to use PostgreSQL - PostGIS (I assume you already installed the spatial modules before) |
| | 17 | Install the one clickInstaller sponsored by EnterpriseDB PostgreSQL and select also installation of postgis. |
| | 18 | Then based on this article http://schwuk.com/articles/2009/09/10/psycopg2-on-os-x install the python database driver |
| | 19 | {{{ |
| | 20 | sudo easy_install pip |
| | 21 | PATH=$PATH:/Library/PostgreSQL/8.4/bin/ sudo pip install psycopg2 |
| | 22 | defaults write com.apple.versioner.python Prefer-32-Bit -bool yes |
| | 23 | }}} |
| | 24 | without the last you will not be able to see available the PostgreSQL driver when web2py launch |
| | 25 | |
| | 26 | === Trouble? === |
| | 27 | * {{{lxml}}} can give trouble on OS X. Try: |
| | 28 | * {{{STATIC_DEPS=true sudo easy_install lxml}}} (adapted from [http://blog.ianbicking.org/2008/12/10/lxml-an-underappreciated-web-scraping-library/ this blog post]) |
| | 29 | * remove other {{{libxml2}}} versions, such as may have been installed by {{{fink}}} or !MacPorts - ONLY works in unmodified python setup. In case you have modified your python you must link some how the python directory with /frameworks/python otherwise lxml will not being found(not tested) |
| | 30 | |