strace of python shows nonsense
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Mon Jan 14 23:25:21 EST 2013
On Tue, 15 Jan 2013 00:50:01 +0100, Joep van Delft wrote:
> Hi there,
>
>
> I am puzzled at how I borked my installation. Python loads slow on my
> machine, and I decided to use strace and /usr/bin/time to see what is
> actually happening.
Before dropping down to such a low level, I suggest you start at a
higher, Python level.
Run `python -E` to disable any environment variables and startup file.
Does that help?
Compare sys.path when running with and without the -E switch. Any
important differences? Anything unusual in sys.path, such as directories
that don't exist?
Run `python -v` to print modules as they are loaded. (Warning: there are
a lot of them.) Can you see any obvious delays?
[...]
> What puzzles me, is the amount of errors for open and stat64. There are
> references to stuff I don't know (~/GNUStep directory? Stuff under
> site-packages that does not exist? Subdirs of site-packages that are not
> included in sys.path?) What is python doing there, and why? And, more
> importantly, how can this be corrected?
What's the value of the environment variable PYTHONPATH?
Do you have a PYTHONSTARTUP set? What is in that file?
--
Steven
More information about the Python-list
mailing list