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

Issue with installing python-mapnik on Mac Sierra, python3.6

Open ngunhaSO opened this issue 7 years ago • 2 comments

I am stuck with the mapnik-python installation. I keep getting this error: "ld: library not found for -lboost-python3 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'clang++' failed with exit status 1"

Even though when i do: brew list | grep 'boost', I got the following boost like the below boost boost-python boost-python3

Before I ran: python3 setup.py build, I also exported the environment by doing this: export BOOST_PYTHON_LIB=boost-python3

But the error still persists

Full steps that I did to try to install this mapnik-python mapping:

  1. git clone https://github.com/mapnik/python-mapnik.git
  2. cd python-mapnik/
  3. git checkout v3.0.x
  4. export BOOST_PYTHON_LIB=boost-python3 note: boost-python3 is installed via brew, then I set: ln -s /usr/local/lib/libboost_python36.a /usr/local/lib/libboost_python3.a ln -s /usr/local/lib/libboost_python36.dylib /usr/local/lib/libboost_python3.dylib Try export BOOST_PYTHON=/usr/local/Cellar/boost-python3/1.67.0_1/lib also does not work
  5. python3 setup.py build

My python3 version: python3 --version Python 3.6.5 mapnik-config --version 3.0.20

Do you have any idea how to fix this?

If i do: export MASON_BUILD=true, I got a different error: /Users/jackynguyen/Downloads/python-mapnik/mason_packages/.link/include/boost/config/posix_features.hpp:18:15: fatal error: 'unistd.h' file not found

ngunhaSO avatar Jul 31 '18 14:07 ngunhaSO

+1 having this issue

robmarkcole avatar Sep 02 '18 17:09 robmarkcole

Two things that may help:

  1. It should be boost_python - that is, an underscore, not a hyphen, in the export BOOST_PYTHON_LIB line, even though the name of the library has a hyphen;
  2. I had to specify export BOOST_PYTHON_LIB=boost_python36 for it to work with my Homebrew installation of boost-python3.

NickFitz avatar Sep 28 '18 21:09 NickFitz