Python Win installations and PYTHONPATH Confusion (WAS: Re: Python Path Blues)

Maan Hamze MHAMZE at
Mon Aug 20 04:40:14 CEST 2001

"Tim Peters" < at> wrote in message
news:mailman.998259271.18104.python-list at
> [Maan M. Hamze]
> > What is important here is that this can be a BIG turn-off for beginners.
> > It took me more than a day of tinkering with the registry while trying
> > make DCOracle2 and mxODBC packages for Python run correctly.
>> I haven't tried either.  Did their docs tell you to do this?

The doc for DCOracle2 instructs the user to use PYTHONPATH.  The doc for
mxODBC does not, but instructs the user to use sys.path
I used the sys.path for mxODBC and it did not work.  So I added it to
PYTHONPATH envar and it worked.
So of course I am confused :)
> > Then I discovered it was all a matter of adding PYTHONPATH into the
> > environment [under Windows]
> That's one way to get it to work <wink>.
> > ...
> > 1.  Upon installing Python (PythonWin or the regular Python
> > distribution for Windows), the registry itself is updated with the
> > lib path,
> It is, but please note that Python never *looks* at this setting in normal
> operation.

Ok!  what setting does it look at then when one adds some library into its
own subdirectory and when one uses the import lib command to use something
from that lib?  sys.path?  is it the sure way?  Or is it to follow the
instructions that comes with the package?  Maybe I ran into some bad luck
then?  Since DCOracle2 and mxODBC did not behave as expected.  Well, they
are working now, but it bothers me that I had to go into all this trouble to
make them work :)

More information about the Python-list mailing list