NewBie question: cannot import TKinter and os
Martin von Loewis
loewis at informatik.hu-berlin.de
Fri Dec 8 21:18:39 CET 2000
etsang at my-deja.com writes:
> 1. at the very first beginning, it says import site error. I know this
> module site is no longer required in Python 2.0 after dereading some
> doc in pytho.org. how can I make thie error go away??
That is incorrect. Where did you read that? site.py is still needed.
> 2. when I tried import Tkinter, it says No Module named TkInter, but it
> is clearly compiled... I did the same thing in versio 1.5.2 and there
> was no problem .....
If it says "No Module named TkInter", it may be that you misspelled
the name of the module: It is Tkinter, not TkInter.
> 3. when I try import expect, it says
> import expect # builtin
> WARNING: Python C API version mismatch for module expect:
> This Python has API version 1009, module expect has version 1007.
> Where can I get the correct 1009 version for expect????
You need to recompile the expect module, I guess. It appears that it
did not actually compile the expect module; instead, you were probably
using an old object file.
More information about the Python-list