[osgeo4w-dev] Python on the registry
Howard Butler
hobu.inc at gmail.com
Thu Jun 4 10:23:46 EDT 2009
On Jun 4, 2009, at 9:20 AM, Lucena, Ivan wrote:
> Hi there,
>
> OSGeo4W installer does not add Python the Windows registry, right?
>
> The problem with that is when you try to run any ".exe" package
> distribution it stop and say: "Could not find Python
> on the registry" and there is no browser button to look for it.
> Examples: Mapplotlib and mod_python installers.
>
> Here is what I did and it worked fine:
>
> {{{
> Windows Registry Editor Version 5.00
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5]
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5\InstallPath]
> @="C:\\OSGeo4W\\apps\\Python25"
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5\PythonPath]
> @="C:\\OSGeo4W\\apps\\Python25\\Lib;C:\\OSGeo4W\\apps\\Python25\
> \DLLs;C:\\OSGeo4W\\apps\\Python25\\Li
> b\\lib-tk"
>
> }}}
>
> But I would like teach some "end-user" kind of people how to easily
> install 'Python+GDAL+Numpy+PyLab' and that
> would be helpful to eliminate this windows registration step. If
> they can't find the "egg"s.
>
> Is that intentional? To avoid conflict with other Python
> installations maybe. I bet it is related to user's permission.
> Right?
It is intentional to not conflict with a user's existing installs.
I think a pair of batch files that add and remove the registry entries
to make they OSGeo4W Python version the system-wide one would be
sufficient. It would then require the user to manually and knowingly
do something that the OSGeo4W installer shouldn't make an assumption
about.
Additionally, you can use eggs in stead of .exe installers if they are
available to get around the registry-finding problem. I know that not
every package has those available though (GDAL does for this reason,
for example).
Howard
More information about the osgeo4w-dev
mailing list