[osgeo4w-dev] PATH variable issue

klo uo klonuo at gmail.com
Mon Dec 10 07:40:42 PST 2012


Hi,

Let me introduce myself:
I'm new osgeo4w user, after I discovered gdal and qgis.
I tried it because I started to dislike programs that ship own Python on
board. Believe it or not but I can name more then 5 programs in my current
setup that have own Python distribution aside my system Python distribution
(and it's is a same version!).
Compiling qgis OTOH is not worth to avoid this nuisance, but installing
environment like osgeo4w is what I found excellent choice.

Now, I have one issue with osgeo4w shell - osgeo4w sets it's path as last
item in PATH variable, so if some executable is found in prior set
directories it will be executed instead osgeo4w version, like I just
experienced. Here is how osgeo4w sets path (http://i.imgur.com/AjEJV.png):

[image: Inline image 1]

I opened OSGeo4W.bat to see how it sets variables, and then see it calls
other batch files and all this environment variables setting is
over-complicated I hope for a reason, as it makes user intervention
unlikely. So my suggestion is whatever scripts sets PATH variable to set it
like this:

    set path=%osgeo4w-path%;%path%

instead:

    set path=%path%;%osgeo4w-path%

That way command clashing can be avoided. At least for the issue I had,
when program from my system Python scripts was executed unsuccessfully
instead from osgeo4w Python script folder.

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/osgeo4w-dev/attachments/20121210/02f891a7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 43463 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/osgeo4w-dev/attachments/20121210/02f891a7/attachment-0001.png>


More information about the osgeo4w-dev mailing list