[orca-list] Problem with PYTHONPATH and multiple versions of orca
- From: Michael Whapples <mwhapples aim com>
- To: orca-list gnome org
- Subject: [orca-list] Problem with PYTHONPATH and multiple versions of orca
- Date: Tue, 23 Sep 2008 12:32:03 +0100
I recently noticed that my trunk build of orca was not being used. The
trunk build was in a custom location, and I had orca 2.22.3 from my
distro installed in the standard place.
After some looking, I realised the following: although the correct orca
bash script was being run, it was importing from the standard python
site-packages directory so using the distro's orca python files. Further
examination of the system revealed that easy_install from setuptools had
added the python site-packages directory to its pth file, so this meant
that the standard site-packages directory was searched for modules
before the custom orca directory which is specified in the PYTHONPATH
environment variable set by the orca script.
I have solved this manually by removing the standard site-packages
directory from the easy-install.pth file, but the question is what can
be done so that orca shouldn't suffer from this again?
Should setuptools (or any other package) add the standard site-packages
directory to their .pth files (I feel the correct answer but relies on
others being correct). Alternatively is there any way orca could ensure
that its custom directory is the first on the packages path as this
shows that PYTHONPATH can fail to do this.
] [Thread Prev