Latest win32 binaries (r638)

Here are the latest win32 binaries (r638) including bindings for Python 2.5. They will be in the 0.5.0 release, which is imminent. So, give it a try and report any problems. Have fun!

Posted by artem on February 5, 2008

Comments

Envy February 6, 2008 at 10:19 a.m.

Hi,

How do we use these binaries. There is no documentation. Please guide.

Artem Pavlenko February 6, 2008 at 10:43 a.m.

1. install Python 2.5 (win32 installer from python.org) into C:\Python2.5
2. install Postgresql (optional)
3. unzip mapnik binaries into c:\mapnik_20080205
( you should end up with directory structure like:
c:\mapnik_20080205\include
c:\mapnik_20080205\lib
....

4. copy content of c:\mapnik_20080205\site-packages\mapnik to
c:\Python2.5\Lib\site-packages\mapnik

5. Ensure c:\mapnik_20080205\lib is in your PATH - use System preferences or on command prompt:
set PATH=%PATH%;c:\mapnik_20080205\lib

6. cd c:\mapnik_20080205\demo\python
7. C:\Python2.5\Python.exe rundemo.py

Enjoy!

Envy February 7, 2008 at 4:08 a.m.

Hi again,

I followed your instructions as above but I get the following error:

The mapnik library and python bindings must have been compiled and installed successfully before running this script.

ImportError: No module named mapnik

Please advise.

Artem Pavlenko February 7, 2008 at 9:09 a.m.

>> mportError: No module named mapnik

Looks like Python bindings didn't make it to the right location.
I suggest you post to mapnik-users and/or ping me on #osm IRC
Thanks

Zordius February 11, 2008 at 3:13 a.m.

Here is a working process for new mapnik 0.5 win32 build:

* install python: http://www.python.org/ftp/python/2.5.1/p...

1.download the mapnik binary: http://prdownload.berlios.de/mapnik/mapn...

2.unzip it, it should be in C:\mapnik-0_5_0\

3.set your system environment veriables, add "c:\mapnik-0_5_0\lib" in PATH.

4.open a new console by run "cmd". type "path" to make sure your PATH contains c:\mapnik-0_5_0\lib

5.run "C:\Python25\python.exe" . type "from mapnik import *" at python prompt. If you get no error message, you made it! mapnik lib is ready for you.

6.open explorer, go c:\mapnik-0_5_0\demo\python, double click rundemo.py

7.you should see demo.* 3 image files...or, you will get a warning message shows lack of boost_somethingelse.dll ....you should install boost c++ library.

* install boost binary: download http://www.boost-consulting.com/boost_1_...

1.you will need check "Multithread, DLL" option in installer, then check "Boost IOStreams"

2.after install done, you will need to add "C:\Program Files\boost\boost_1_34_1\lib" in your path. you should reopen a new console to check the new path setting is correct or not.

3.now you may run the demo by open explorer, go c:\mapnik-0_5_0\demo\python, double click rundemo.py

Zordius February 11, 2008 at 3:21 a.m.

I forgot an import step: After unzip mapnik, you should copy C:\mapnik-0_5_0\site-packages\mapnik\ as C:\Python25\Lib\site-packages\mapnik\ . or, when you "from mapnik import *" you will get into trouble.

Envy February 11, 2008 at 7:41 a.m.

I'm still getting an error that the mapnik module is not there. I've done everything as listed above. Any idea why I'm getting this. The Path was set ok too.

Artem Pavlenko February 11, 2008 at 8:59 a.m.

Zordious, thanks for sharing your experience. There were two DLLs missing in mapnik 0.5.0 win32 binaries (iconv and iostreams). It is fixed, so no need to install boost.

Envy, it looks like some path/missing library issue. Could you try downloading mapnik again from : http://prdownload.berlios.de/mapnik/mapn...

If you're still having trouble find me on #osm

Adrian March 8, 2008 at 11:34 a.m.

I get the following error when running generate_tiles:
python.exe generate_tiles.py
render_tiles( (-180.0, -90.0, 180.0, 90.0) osm.xml tiles/ 0 5 world )
got exception ...
Traceback (most recenet call last):
File "generate_tiles.py", line 126, in <module>
render_tiles(bbox, mapfile,tile_dir, 0, 5, "World")
File "generate_tiles.py",line 53 in render tiles
load_map(m,mapfile)
RuntimeError: failed opening file: The handle is invalid.

I am running Cygwin under Windows XP.

Any assistance would be appreciated.

Thanks,

Adrian.

George April 17, 2008 at 7:20 p.m.

I am getting the same error as Adrian

George April 17, 2008 at 7:34 p.m.

Got it... wrong file paths in XML. Seems that the osm.xml downloaded from their site contains a lot of hard-coded paths and the env params dont take effect

Alex @ www.cubicom.ch April 19, 2008 at 12:02 a.m.

This should definitely be in the wiki ^^