problems with installer 20_3i

Gordon McMillan gmcm at hypernet.com
Sat Dec 2 21:30:42 EST 2000


[posted and mailed]

Scott Hathaway wrote:

>After running:
>
>python standalone.py bw.py
>
>It seems to go ok, but when trying to run the .exe, I get:
>
>C:\Python\install\dist_bw>bw
>Traceback (most recent call last):
>  File "<string>", line 3, in ?
>  File "c:\python\lib\imputil.py", line 91, in _import_hook
>    raise ImportError, 'No module named ' + fqname
>ImportError: No module named time
>
>What did I do wrong?

Nothing. Barry Scott just pointed out to me that the Python 2.0 imputil 
does not by default install any method of importing builtins (even though 
it installs, by default, a file system importer).

Untested: at the top level of archive_rt (after the imports), put:

sys.path.append(imputil.BuiltinImporter())

archive_rt will be imported by the C code long before your script runs, so 
builtins should be available.

- Gordon




More information about the Python-list mailing list