[Tutor] 'import site' failed error

Kent Johnson kent_johnson at skillsoft.com
Thu Aug 12 12:49:44 CEST 2004


nik,

I guess it is referring to the -v (verbose) option that you can pass to 
python when you start it up:
D:\Projects>python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# C:\Python23\lib\site.pyc matches C:\Python23\lib\site.py
import site # precompiled from C:\Python23\lib\site.pyc
# C:\Python23\lib\os.pyc matches C:\Python23\lib\os.py
import os # precompiled from C:\Python23\lib\os.pyc
etc...

traceback is the stack trace. So this may give you more specific 
information about the location and type of failure. Give it a try and let 
us know what it says!

Kent

At 12:29 PM 8/12/2004 +0200, nik wrote:
>hi,
>
>I've compiled the example in the Extending and Embedding tutorial section 
>2.1 (creating an module with a couple of string objects), and I get the error
>
>'import site' failed; use -v for traceback
>
>even though the correct output is then printed to the screen.
>
>What does this mean?
>Do I need to post my code here (I've made a few modifications)?
>How do I do the -v for traceback, and would it be useful to me?



More information about the Tutor mailing list