Python20 and .pth files
MarkH at ActiveState.com
Wed Feb 14 17:12:35 EST 2001
greg Landrum wrote:
> However... one of the applications I'm working on creates Python COM
> servers which import Numeric. These work fine when I call them from Python
> applications (so none of my unit tests broke when I upgraded to 2.0, so I
> never noticed the problem). However, when I create one of these COM
> objects from within VB, I get an ImportError for Numeric. After much
> shrieking and pulling of my hair (I'm giving a demo of these objects on
> Friday, so I was not pleased to discover that they were mysteriously
> broken), I worked out a solution: add c:/Python20/Numeric to my PYTHONPATH
> environment variable. Now everything is happy.
I believe this is a problem in certain embedding situations. Specifically, I believe it is because Python does not know its "home", so doesnt know where to load the .pth files from.
> The Question:
> Was it an accident that everything just worked before or has something
> changed? I know old versions of Numeric used to have an installer that may
> or may not have set registry keys to help out with this problem.
> Are .pth files being deprecated so that we (the users) should start
> badgering developers who still ship modules requiring them?
I dont believe this would ever have worked. As you suggest, it is quite possible that only new versions of Numeric have .pth files.
This is on my "to-do" list - having Python know its correct home in embedded situations would solve a few other problems too.
Nominate Your Favorite Programmers
for the Perl and Python Active Awards!
More information about the Python-list