python-mapnik icon indicating copy to clipboard operation
python-mapnik copied to clipboard

Unable to compile python-mapnik with correct boost

Open cpaulik opened this issue 4 years ago • 1 comments

I've been trying to compile mapnik and python-mapnik with conda which I was able to do in tha past. But now I consistently get the following error after compilation:

import mapnik
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/cpa/.pyenv/versions/miniconda2-4.3.30/envs/onesat-mapnik/lib/python3.7/site-packages/mapnik/__init__.py", line 1071, in <module>
    register_plugins()
  File "/home/cpa/.pyenv/versions/miniconda2-4.3.30/envs/onesat-mapnik/lib/python3.7/site-packages/mapnik/__init__.py", line 1053, in register_plugins
    DatasourceCache.register_datasources(path)
Boost.Python.ArgumentError: Python argument types in
    DatasourceCache.register_datasources(str)
did not match C++ signature:
    register_datasources(std::string)

I've looked at some issues that seemed similar and already set

export BOOST_PYTHON_LIB=boost_python37

during compilation which I do with the following:

python setup.py whichboost
pip install --prefix=$PREFIX .

I'm sorry if this is a bit vague but is there anything else I could look at?

cpaulik avatar May 11 '21 06:05 cpaulik

try via git repository donwload repository fe. git clone htttps://github.com/mapnik/mapnik.git cd mapnik git check v3.1.x (or skip if u want master) git submodule update --init ./configure (check u have all dependencies) make install than python-mapnik donwload repository if u want branch u have to specify it. git clone --branch v3.0.x --single-branch https://github.com/mapnik(python-mapnik.git cd python-mapnik python setup setup.py develop then try mapnik-config -v and python: import mapnik

i did it on debian (jessie and strech)

mar0321 avatar Aug 04 '21 05:08 mar0321