title: Installing pyosmium
body: <p>I've been having trouble installing <a href="http://osmcode.org" rel="nofollow">pyosmium</a> on OS X 10.8 with the Canopy installation of Python. I'm not sure where the headers should go, and I get different install errors depending on where I try.</p>
  
  <p>I've installed the dependencies (Boost.Python, osmium, etc.). I think the problem is related to the location of the Canopy Python installation compared to these dependencies. See <a href="https://github.com/GalSim-developers/GalSim/wiki/Installation-FAQ#in-mac-osx-what-can-i-do-if-im-having-trouble-getting-boostpython-to-work-with-enthought-canopy-python" rel="nofollow">this</a> thread on similar challenges installing Boost with Canopy.</p>
  
  <p>I've tried installing Boost (and Boost Python) and osmium into:
  /usr/local/include</p>
  
  <p>I then run 
  <code>python setup.py build</code>
  to install pyosmium, and get the error:
  lib/osmium.cc:3:10: fatal error: 'osmium/visitor.hpp' file not found</p>
  
  <p>Adding a symbolic link to the osmium directory to /Library/Enthought/Canopy_64bit/User/include/, I get the error:
  /usr/local/include/osmium/visitor.hpp:36:10: fatal error: 'type_traits' file not found</p>
  
  <p>If I install them in /Users/[username]/Library/Enthought/Canopy_64bit/User/include/, I get:
  Traceback (most recent call last):
    File "setup.py", line 31, in 
      raise Exception("Cannot find boost_python library")</p>
  
  <p>Other permutations raise similar errors. Ideas would be much appreciated!</p>
  
  <p>UPDATE: after more trying, the problem seems to be that <code>setup.py</code> for pyosmium cannot find the boost headers. I added the path to boost to the <code>includes</code> list in <code>setup.py</code>. However, it still can't find type_traits and the other boost headers.</p>
  
  <pre><code>&gt; $ python setup.py build
  &gt; running build 
  &gt; running build_py 
  &gt; running build_ext
  &gt; building 'osmium._osmium' extension
  &gt; gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64 -I/usr/local/include/boost_1_57_0 -I/usr/include -I../libosmium/include -I../boost -I/Applications/Canopy.app/appdata/canopy-1.5.0.2717.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c lib/osmium.cc -o build/temp.macosx-10.6-x86_64-2.7/lib/osmium.o -std=c++11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  &gt; In file included from lib/osmium.cc:3:
  &gt; /usr/local/include/osmium/visitor.hpp:36:10: fatal error: 'type_traits' file not found
  &gt; #include &lt;type_traits&gt;
       ^
  &gt; 1 error generated.
  &gt; error: command 'gcc' failed with exit status 1
  </code></pre>