So, according to the imposm docs:
Imposm runs with Python 2.5, 2.6 and 2.7 and is tested on Linux and Mac OS X. Other dependencies are:
psycopg2: PostgreSQL adapter for Python
Tokyo Cabinet: File-based key-value database for the internal cache
Google Protobuf: PBF parsing library
GEOS Geospatial geometries library
Some parts are written as a C extension and so you need to have a C/C++ compiler and the Python header files.
Imposm also requires the following Python packages:
imposm.parser: XML and PBF parsing sub-package
Shapely: Python bindings for GEOS. 1.2 or newer is required, >=1.2.10 is recommended.
But while it's great that it's "tested on ... Mac OS X" unfortunately all of the installation instructions are for Ubuntu. So here's how to do it on a Mac:
virtualenv ~/.virtualenvs/gis
source ~/.virtualenvs/gis/bin/activate
Everything below should be installed with the gis virtualenv activate
d
installing psycopg2 [needs psql in your $PATH and an ARCHFLAGS correction] (http://alirazabhayani.blogspot.com/2013/07/install-psycopg2-on-mac-os-x-pgconfig.html) assuming you installed postgress.app -- otherwise sub your path to psql check the path with:
which psql
if not found, put your postgress bin dir in your path. The path below is what it will be if you installed psql via postgresapp
export PATH=/Applications/Postgres93.app/Contents/MacOS/bin:$PATH
sudo env ARCHFLAGS="-arch i386 -arch x86_64"
pip install psycopg2
Thank goodness for homebrew
brew install geos
brew install protobuf
pip install imposm.parser
pip install Shapely
mkdir tokyocabinet
cd tokyocabinet
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.48.tar.gz
tar xvf tokyocabinet-1.4.48.tar.gz
cd tokyocabinet-1.4.48
./configure
make
sudo make install
pip install imposm
Thank you this works perfectly for me 👏