module error in Vista -- works as administrator
sawilla at gmail.com
Tue Apr 22 01:15:15 CEST 2008
On Apr 21, 5:42 pm, John Machin <sjmac... at lexicon.net> wrote:
> Log on as administrator, start python in command window and do this:
> import sys
> sys.path # shows where python is looking for importables
> import numpy
> import os.path
> print os.path.abspath(numpy.__file__) # shows where it found numpy
> Log on as ordinary user, start python in command window and do this:
> import sys
> # check how this is different from the admin's sys.path
> If you can't see what to do after that, come back here with the output
> from those steps.
That was a great help, thank you. I now see what is causing the
problem but I don't know how to fix it. I used easy_install to install
several packages. When I run Python from an administrator command
window all of the directories in C:\Program Files\Python25\Lib\site-
packages\easy-install.pth are added to the sys.path. When I run it as
a regular user, those directories are not added to the sys.path and so
Python can't find the modules.
I know how to manually add those directories to Python's search path
but then I'll need to update the path every time I install something.
How do I get Python to automatically load the easy-install.pth file
for the regular user account?
More information about the Python-list