Mapnik is a tool to produce maps out of gis data.

Since installation in a virtualenv through pip install mapnik2 fails, due to compilation problems (boost library cannot be located correctly), the following workaround can be used.

  • Install Mapnik through macports:

    sudo port install mapnik @2.2.0_0+python27

    This will install both the libraries and the python bindings, as global packages in:

  • Link mapnik directories into the virtualenv’s site_package directory:

    workon <virtualenv>
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mapnik .
    ln -s /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mapnik2 .

Using Tkinter inside a virtualenv

Sat 19 October 2013 by guglielmo
Filed under howto Tags python osx macports

Tkinter is usually installed on OSX trhough macports as a global package:

sudo port install py27-tkinter

Within a virtualenv the package will not be imported, as global packages are not included by default:

>>> import Tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library ...
read more

Fixing the “can’t start the AWT” bug for Tomcat6

Tue 25 June 2013 by guglielmo
Filed under howto Tags tomcat6 java macports osx

After a Java upgrade on the OSX, Tomcat6 is not starting properly. The log shows a Java error:

2013-06-27 14:45:40.300 jsvc[57146:203] Apple AWT Java VM was loaded on first thread -- can't start AWT.
Jun 27, 2013 2:45:40 PM org.apache.catalina.startup ...
read more
Fork me on GitHub