3

I got the following error message when trying to install 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

How can I fix it?

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
  • How this ( general administration, devops ) relates to programming? – mrogal.ski Aug 29 '18 at 09:27
  • How do 99% of the questions in https://stackoverflow.com/questions/tagged/git (or choose any editor ... or development tool in general) relate to programming? – Martin Thoma Aug 29 '18 at 09:37
  • They may relate or may not, currently I'm seeing your question which has nothing to do with programming. You've posted question that cannot even relate to development. This is purely administrative problem. – mrogal.ski Aug 29 '18 at 09:40
  • 3
    @Mateusz You're completely wrong here. Everything in the question is related to development — Python is a programming language, osmium and boost_python are libraries for development. Questions about installation/configuration/administration of development tools are on-topic for StackOverflow. Please revoke your close vote. – phd Aug 29 '18 at 20:17
  • @phd I do not agree with you and I wont retract my close vote. This question is not about python and not about osmium or even boost, this is clearly a problem with installing additional libraries which then can be used to properly use osmium. This library can be used not only in the development process but to run certain applications ( games, office tools, etc. ) which can be brought down to basic usage of PIP ( the only thing that relates to development/programming ). – mrogal.ski Aug 30 '18 at 08:40

1 Answers1

4

The fix for that issue on Ubuntu 16.04 is

$ sudo apt-get install libboost-python-dev

Other issues

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

is fixed with

sudo apt-get install libbz2-dev
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958