Giter Site home page Giter Site logo

python-mapnik's Introduction

Build Status

Python bindings for Mapnik.

Installation

Eventually we hope that many people will simply be able to pip install mapnik in order to get prebuilt binaries, this currently does not work though. So for now here are the instructions

Create a virtual environment

It is highly suggested that you a python virtualenv when developing on mapnik.

Building from Mason

If you do not have mapnik built from source and simply wish to develop from the latest version in mapnik master branch you can setup your environment with a mason build. In order to trigger a mason build prior to building you must set the MASON_BUILD environment variable.

export MASON_BUILD=true

After this is done simply follow the directions as per a source build.

Building from Source

Assuming that you built your own mapnik from source, and you have run make install. Set any compiler or linking environment variables as necessary so that your installation of mapnik is found. Next simply run one of the two methods:

python setup.py develop

If you wish to are currently developing on mapnik-python and wish to change the code in place and immediately have python changes reflected in your environment.

python setup.py develop --uninstall

Will de-activate the development install by removing the python-mapnik entry from site-packages/easy-install.pth.

python setup.py install

If you wish to just install the package

Testing

Once you have installed you can test the package by running:

git submodule update --init
python setup.py test

The test data in ./test/data and ./test/data-visual are standalone modules. If you need to update them see https://github.com/mapnik/mapnik/blob/master/docs/contributing.markdown#testing

Troubleshooting

If you hit an error like:

Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

That means you likely have built python-mapnik is linked against a differ python version than what you are running. To solve this try running:

/usr/bin/python <your script.py>

If you still hit a problem create an issue and we'll try to help.

python-mapnik's People

Contributors

artemp avatar avlee avatar beaugunderson avatar cezarytarnowski-tomtom avatar cpsandbox avatar flippmoke avatar herm avatar hollinger avatar jburgess777 avatar jfdoyon avatar jmdh avatar kevinkreiser avatar kkaefer avatar kunitoki avatar lightmare avatar mikemorris avatar mrudowski1 avatar nehhen avatar nickw1 avatar noirbizarre avatar plepe avatar rcoup avatar rjw57 avatar rundel avatar sebastic avatar talaj avatar tmcw avatar tomhughes avatar yohanboniface avatar zerebubuth avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.