On 15/04/2007 10.02, palo wrote:

> The list of modules is identical. Here is what I get with those print
> statements uncommented:
> 
> importHook(encodings, __main__, locals, None)
>  importHook trying encodings in None
> importHook(imp, archive, locals, None)
>  importHook trying imp in None
> importHook done with imp archive None (case 2)
> importHook(os, __main__, locals, None)
>  importHook trying os in None
> importHook(imp, archive, locals, None)          <-----here
>  importHook trying imp in None
> importHook done with imp archive None (case 2)
> importHook(os, __main__, locals, None)
>  importHook trying os in None
> Traceback (most recent call last):
>   File "<string>", line 3, in ?
>   File "F:\pyinstaller\iu.py", line 334, in importHook
>     raise ImportError, "No module named %s" % fqname
> ImportError: No module named encodings
> 
> Don't know if it helps, but when python2.4 is installed on the
> computer (and thus everything works), the marked line is
> importHook done with os __main__ None (case 2)

Right. It looks like the module "os" is executing an import statement. The 
only optional import statement I can see in os.py is:

# Change environ to automatically call putenv() if it exists
try:
     # This will fail if there's no putenv
     putenv
except NameError:
     pass
else:
     import UserDict      <<------------ HERE


But I can't see how that might change between having and not having a Python 
installed.

Next step is to find out what's going on while importing "os". Basically after 
this line:

  importHook trying os in None

it should start importing os.py. Try putting prints everywhere in os.py, until 
you find the very last statement that is executed *BEFORE* this line appears:

  importHook(imp, archive, locals, None)          <-----here

In other words, let me know which line of os.py triggers this importHook.

> I noticed that in support\rthooks there is a file opengl.py and it is
> not compiled to a pyc, so it was never imported (does it mean that I
> forgot some switch?).

No that's fine: you should see "opengl" listed in ArchiveViewer in the first 
screen (as soon as you start it on the executable).
-- 
Giovanni Bajo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to