mapnik / python-mapnik

Python bindings for mapnik
GNU Lesser General Public License v2.1
160 stars 91 forks source link

File not found #151

Closed taltoris closed 7 years ago

taltoris commented 7 years ago

I'm on OSX Yosemite 10.10.5. I just compiled+installed Mapnik 3. mapnik-config -v => 3.0.12 However, when I attempt to build the python bindings...

python setup.py install =>
src/mapnik_datasource.cpp:37:10: fatal error: 'mapnik/geometry/box2d.hpp' file not found
#include <mapnik/geometry/box2d.hpp>

Can somebody tell me what is causing this?

artemp commented 7 years ago

@taltoris - you should use v3.0.x branch => https://github.com/mapnik/python-mapnik/tree/v3.0.x

springmeyer commented 7 years ago

https://github.com/mapnik/python-mapnik/tree/v3.0.x

👍

timxi commented 7 years ago

I still get the same error even I switch to v3.0.x branch bash-3.2$ git branch -a master

timxi commented 7 years ago

@springmeyer I still get the same error:

src/mapnik_datasource.cpp:37:10: fatal error: 'mapnik/geometry/box2d.hpp' file not found

springmeyer commented 7 years ago

@timxi you need the v3.0.x branch of both mapnik core and python-mapnik.

timxi commented 7 years ago

thanks @springmeyer , I'm using a mac. Here is the step I try to install mapnik and the python-mapnik:

  1. brew update
  2. brew install mapnik
    bash-3.2$ mapnik-config --version
    3.0.13
  3. git clone git@github.com:mapnik/python-mapnik.git
  4. switch to v3.0.x branch
  5. ./bootstrap.sh
  6. sudo python setup.py install

which step should I change?

timxi commented 7 years ago

@springmeyer and @artemp any idea what should I do to fix this issue?

gabefair commented 6 years ago

Hi @timxi , did you ever solve your issue? I'm getting the same error. I'm curious if this was fixed #143

jullbull commented 6 years ago

same error, any one fix that?

talaj commented 6 years ago

@jullbull Do not use the bootstrap.sh script unless you want to participate in development of Mapnik. The purpose of bootstrap.sh is to prepare environment under which all visual tests are passing. This is not needed for normal operation of Mapnik. Just build against system libraries.

Also as mentioned above, if you are getting 'mapnik/geometry/box2d.hpp' file not found, that means you are building recent master branch of python-mapnik against older version of Mapnik, where such file is under different location (include/mapnik/box2d.hpp). Build v3.0.x branch of python-mapnik against v3.0.x branch of Mapnik or master branch against master branch.

fracaron commented 5 years ago

Same problem here. Built mapnik from https://github.com/mapbox/mapnik-vector-tile/ (v3.0.0). Mapnik v3.1.0 got installed. When trying to install python-mapnik, I also get a 'mapnik/box2d.hpp' file not found.

I have found that the file is located in /mapnik/geometry/box2d.hpp instead of /mapnik/box2d.hpp

dkegle commented 5 years ago

It worked for me when I switched to branch v3.0.21 in mapnik and v3.0.x in python-mapnik.