Installing Python Mapscript on Windows XP

Frank Warmerdam fwarmerdam at GMAIL.COM
Thu Apr 28 11:46:33 EDT 2005


On 4/28/05, Bas Vanmeulebrouk <bvanmeul at ebe.uct.ac.za> wrote:
> Frank,
> 
> Thank you very much for your reaction. I did rename the one in the
> windows/system32 directory. However, I didn't notice that there were two
> gdal12.dll's in the Python installation directory: one in the root and one
> in the DLLs subdirectory. 

Bas, 

Ah, I see.  That would be an issue too. 

>  I have renamed the one in the DLLs subdirectory
> and after that got a different error message (now sde90.dll was missing).

> This errormessage always appeared, no matter from what location I started
> Python. Sde90.dll was on my machine, in the C:\Program Files\Common\ESRI
> directory. After I had added this directory to the PATH environment
> variable, Python Mapscript was finally working. But does this mean Python
> Mapscript needs some ESRI files? The ones I have came with the installation
> of ESRI MapObjects 2.3.

I believe that Howards build of MapScript includes SDE support, and so 
depends on some SDE DLLs.  But that is just because Howard include
SDE support ... it isn't general to Python MapScript. 

> I want to use Python/Mapscript to generate a map and some HTML which can be
> displayed in webbrowser. So I thought I should get a Python/Mapscript script
> which does this to work as a CGI script. I can get Apache to execute a
> Python CGI script, but when I include the line "import mapscript", I get an
> internal server error and the following error messages in the Apache error
> log.
> 
> Traceback (most recent call last):\n
>    File "c:\\PROGRA~1\\APACHE~1\\apache\\cgi-bin\\HELLO_~1.PY", line 4, in
> ?\n
>      import mapscript\n
>    File "C:\\programs\\python23\\Lib\\site-packages\\mapscript.py", line 4,
> in ?\n
>      import _mapscript\n
> ImportError: DLL load failed: The specified module could not be found.\n
> 
> I don't have a clue which dll is missing this time. Anyone? Or is there
> another way to achieve this?

This is the main mapscript DLL.  I'll leave it to Howard or others to
talk about how to deploy Howards MapScript in a cgi environment. 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list