bramot Posted June 23, 2017 Report Share Posted June 23, 2017 Hey, My quest: I would like to create my own postgis database using Openstreetmap. My problem: None of the OSM/map libraries for python seems to work on windows. My setup: - Windows 7 - Python 2.x / 3.x Anyone here who know how to use any of the libs in windows? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
pjduplooy Posted June 23, 2017 Report Share Posted June 23, 2017 Hi bramot Welcome here.... Have you tried osm2pgsql or osm2pgrouting? Pieter Quote Link to comment Share on other sites More sharing options...
jorrarro Posted June 28, 2017 Report Share Posted June 28, 2017 (edited) Usually Python libs work in Windows, installing them is the problem. Mostly there is somewhat cryptic error saying it cannot find vcvarsall.bat or some other file. However, if you install the prerequisites from the precompiled wheels, you can install the library using pip. For example, OSMpythonTools has a lot of prerequisites, such as lxml, pandas, matplotlib, ujson. Now just typing in "pip install osmpythontools" gives an error like this: " Running setup.py install for ujson ... error Complete output from command C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Tanel\\AppData\\Local\\Temp\\pip-build-hrf5z5wi\\ujson\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Test\AppData\Local\Temp\pip-tva4s83x-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_ext building 'ujson' extension error: Unable to find vcvarsall.bat " So the solution is to download the precompiled wheel from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ And install the wheel "pip install C:\tmp\ujson-1.35-cp34-cp34m-win_amd64.whl". Then retry installing and if there is error with any packages, install corresponding wheels. Edited June 28, 2017 by jorrarro Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.