python mapscript

Probleme bei der Installation?
Antworten
orc
User
Beiträge: 2
Registriert: Freitag 7. Dezember 2007, 11:47

Hallo,

ich habe folgendes Problem mit meiner Pythoninstallation. Wenn ich folgendes Skript aufrufe:

Code: Alles auswählen

#!/usr/local/bin/python
import mapscript

# Set the map file to use
mapfile = "geoland_test.map"

# Create a mapObj, initialized with the mapfile above
mapobject = mapscript.mapObj(mapfile)

# Create an imgObj that has an image of the map
mapimage = mapobject.draw(  )

# Save the mapimage to a file
mapimage.save("geoland.png")

erhalte ich folgenden error_log fehler:
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] Traceback (most recent call last):
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] File "/var/www/htdocs/tc/tests/test.py", line 2, in <module>
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] import mapscript
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] ImportError: No module named mapscript
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] Premature end of script headers: test.py
hat vielleicht jemand eine Idee wie ich den mapserver für python aktiviere bzw installieren kann?
mapserver version 4.10.2 ist auf meinem system installiert.[/quote]
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Was ist denn `mapscript`? Wo kommt das her?
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
Antworten