wiki:InstallationGuidelines/Mac/Developer

Version 7 (modified by Pat Tressel, 10 years ago) ( diff )

--

Installation Guidelines: Mac - Developer

As a Developer using a Mac, you have 2 choices:

  • Install Apple compiler tools, Python, and all libraries manually: InstallationGuidelines/Mac/Developer/Manual
    This option takes longer, but allows getting the latest versions of tools and packages, and does not have the window size limitations of the current VirtualBox on Mac.
  • Install VirtualBox & run a Virtual Machine which includes a pre-configured Eclipse on an Ubuntu OS
    This is appropriate for getting started quickly, as browser and IDE setup has been done. The virtual machine itself will need some setup. The virtual machine desktop is limited to a rather small window, as it cannot currently be resized, nor made full-screen. Installing directly on your machine may be a better choice if you are interested in doing long-term Eden development.

Install Python

  1. FIRST:
  • You WILL NEED Apple's Xcode Developer Tools (http://developer.apple.com/technologies/tools/) (version 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer Connection site, on your Mac OS X installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended. Ensure that the optional components for command line development are installed ("UNIX Development", plus "System Tools" in newer versions, or "Command Line Support" in older ones).
  • If you need some advanced GIS features of Eden. Before you proceed install the GDAL framework
  1. Python: http://python.org/ftp/python/2.7.2/python-2.7.2-macosx10.6.dmg
  1. You also need to install some modules of python

(You may want to consider using Pip for these installations)

STATIC_DEPS=true sudo easy_install lxml
sudo easy_install shapely
sudo easy_install reportlab
sudo easy_install xlwt
sudo easy_install pyserial
sudo easy_install tweepy
  1. In case you want to use PostgreSQL - PostGIS (I assume you already installed the spatial modules before) Install the one clickInstaller sponsored by EnterpriseDB PostgreSQL and select also installation of postgis. Then based on this article http://schwuk.com/articles/2009/09/10/psycopg2-on-os-x install the python database driver
    sudo easy_install pip
    PATH=$PATH:/Library/PostgreSQL/8.4/bin/ sudo pip install psycopg2
    defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
    
    without the last you will not be able to see available the PostgreSQL driver when web2py launch

Trouble?

  • lxml can give trouble on OS X. Try:
    • STATIC_DEPS=true sudo easy_install lxml (adapted from this blog post)
    • 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)
  • Mac OS X: Xcode to compile some Python libraries: http://developer.apple.com/technologies/tools/xcode.html

Next

Install Web2Py & Sahana:

Note: See TracWiki for help on using the wiki.