我正在尝试使用mapnik和我的mac os x 10.8.3上由homebrew完成的python安装。这是问题所在:
otool -L $(brew list boost | grep 'python.*.dylib')
/usr/local/Cellar/boost/1.53.0/lib/libboost_python-mt.dylib:
/usr/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
正如您所看到的,它指向/usr/local/opt/python
...这是完全错误的(这是Apple提供的defailt python,我不打算使用它)。
我该怎么改变?感谢
答案 0 :(得分:2)
我终于做到了。方法如下:
我跑了这个命令:
brew rm $(brew deps mapnik --with-cairo)
brew rm mapnik
brew rm boost
brew update
brew doctor
brew install --with-icu --build-from-source boost
brew install mapnik --with-cairo
现在,命令otool -L $(brew list boost | grep 'python.*.dylib')
仍显示:
/usr/local/Cellar/boost/1.53.0/lib/libboost_python-mt.dylib:
/usr/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)