Public bug reported: Hi, I'm trying to upgrade a script using Mapnik from Python 2.7 to 3.5, but instantiating the object fails with the following error. As far as I can tell the problems stems from the fact that the Python 3 version of mapnik is linked to the Python 2.7 version of boost (libboost_python-py27.so.1.58.0 as opposed to libboost_python-py35.so.1.58.0):
python3.5 ./generate_tiles_generic_3.py Traceback (most recent call last): File "./generate_tiles_generic_3.py", line 30, in <module> import mapnik File "/usr/lib/python3/dist-packages/mapnik/__init__.py", line 74, in <module> from ._mapnik import * ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type Checking ldd of the Python package reveals: ldd _mapnik.cpython-35m-x86_64-linux-gnu.so ... libboost_python-py27.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0 (0x00007fbed5273000) The Pyhon script has the following on line 30: import mapnik Br, Martin ProblemType: Bug DistroRelease: Ubuntu 15.10 Package: python3-mapnik 1:0.0~20150817-da1d9dd-1 ProcVersionSignature: Ubuntu 4.2.0-34.39-generic 4.2.8-ckt4 Uname: Linux 4.2.0-34-generic x86_64 ApportVersion: 2.19.1-0ubuntu5 Architecture: amd64 CurrentDesktop: XFCE Date: Wed Mar 30 12:56:08 2016 InstallationDate: Installed on 2015-02-26 (397 days ago) InstallationMedia: Xubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1) SourcePackage: python-mapnik UpgradeStatus: Upgraded to wily on 2015-11-10 (140 days ago) ** Affects: python-mapnik (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug wily -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1563789 Title: Linked against Python2.7 version of boost causing mapnik to fail To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-mapnik/+bug/1563789/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs