Imposm installed, but missing modules

641 Views Asked by At

I installed imposm according to instructions in the manual, but some module seems to be missing. What's wrong with it?

  File "mapping.py", line 2, in <module>
    from imposm.mapping import (
ImportError: cannot import name FixInvalidPolygons

Trying to run the line:

> from imposm.mapping import Options
ImportError: No module named mapping
2

There are 2 best solutions below

1
On

as per source code of imposm.mapping, it has FixInvalidPolygons class. Please check PUTHONPATH, it must have directory where imposm installed.

0
On

Found out the reason. I had installed imposm.parser, and then pip install imposm did nothing, it stated that all requirements were already met. So I did

sudo pip uninstall imposm
sudo apt-get install libtokyocabinet-dev
sudo pip install imposm