Using Mapnik inside a virtualenv on OSXSun 20 October 2013 by guglielmo
Filed under howto Tags python osx macports
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> cdsitepackages 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
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
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