Import site failed, and freezing.
cmkl
cmkleffner at gmx.de
Mon Jan 28 11:20:53 EST 2002
hi,
change your 'sity.py' in the lib/python2.2 directory and
comment out the following lines:
(or make an customized copy of site.py in your local directory
where your script lives you going to freeze)
# Append ./build/lib.<platform> in case we're running in the build dir
# (especially for Guido :-)
#if os.name == "posix" and os.path.basename(sys.path[-1]) == "Modules":
# from distutils.util import get_platform
# s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
# s = os.path.join(os.path.dirname(sys.path[-1]), s)
# sys.path.append(s)
# del get_platform, s
this get me rid of the warning at startup and unneeded freezed
distutils modules.
-cmkl
=?ISO-8859-1?q?=22H=E5kon= =?ISO-8859-1?q?Brug=E5rd=22= <haakon at fast.no> wrote in message news:<a3399h$ksa$1 at news.ost.eltele.no>...
> Hi!
>
> After changing to Python 2.2 I came across a peculiar error.
> I have modules in my system which I freeze separately on a
> Linux Redhat 7.2 box. However, after switching to 2.2, one of the
> modules reports:
>
> "import site failed"
>
> when starting up on another machine than the one it was
> frozen on..(still Redhat 7.2, though)
>
> When I freeze the module, I see that site.py is reported frozen,
> but, alas, I still get the error msg.
>
> I know that site.py is something that is pre-imported by the
> interpreter, so it shouldn't be something in the code, right?
> But why do the other modules not report this error then?
>
> I'm really really puzzled, so any input would be greatly
> appriciated.
>
> Cheers,
> HÃ¥kon
More information about the Python-list
mailing list