"No module named 'osmium._osmium'" error when trying to use PyOsmium
Question: I am trying to use [PyOsmium](https://github.com/osmcode/pyosmium) but it will
not import. `python3 setup.py install` appears to complete just fine but when
I `import osmium` I get the error:

    
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Users/dylan/Downloads/osmium/osmium/__init__.py", line 1, in <module>
        from ._osmium import *
    ImportError: No module named 'osmium._osmium'
    

I have no idea what's causing this and it's my first time manually installing
a C++ wrapper. I have the top-level PyOsmium and libosmium directories in the
same directory. Is it trying to import the C++ files?

Any help would be much appreciated.


Answer: I had the [same problem](https://github.com/osmcode/pyosmium/issues/9). The
solution, [as provided by one of the
maintainers](https://github.com/osmcode/pyosmium/issues/9#issuecomment-169442027),
is very easy:

> Are you in the pyosmium root directory while trying the import? Change the
> directory to somewhere else and try again. In the root directory the local
> osmium source directory takes precedence over your freshly installed
> version.

Change to a different directory from the one you compiled in and it should
work; it did for me.

