如何修复 "Exception: Cannot find boost_python library"?

How do I fix "Exception: Cannot find boost_python library"?

我在尝试安装 osmium 时收到以下错误消息:

$ pip install osmium --user
[...]
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-hjt_5k/osmium/setup.py", line 115, in <module>
    raise Exception("Cannot find boost_python library")
Exception: Cannot find boost_python library

我该如何解决?

Ubuntu 16.04 上该问题的修复是

$ sudo apt-get install libboost-python-dev

其他问题

libosmium-2.14.2/include/osmium/io/bzip2_compression.hpp:52:19: fatal error: bzlib.h: No such file or directory
compilation terminated.
error: command 'c++' failed with exit status 1

固定为

sudo apt-get install libbz2-dev