Hi all,
I had got an Import error on PIL (far below). For whatever reason, my
installation (which is the most recent, and downloaded from the PIL
website) requires "from PIL import Image" instead of "import Image".
(see my patch file below, everything between the starred lines).
This could be a recent change on PIL's part (or a misconfiguration on
my machine). Is there a way to automatically check for both? Or if
PIL is no longer supporting "import Image", perhaps updating the hook?
Cheers
Mike
**************************
Index: PyInstaller/hooks/shared_PIL_Image.py
===================================================================
--- PyInstaller/hooks/shared_PIL_Image.py (revision 1406)
+++ PyInstaller/hooks/shared_PIL_Image.py (working copy)
@@ -18,7 +18,9 @@
hiddenimports = []
def install_Image(lis):
- import Image
+ from PIL import Image
+
# PIL uses lazy initialization.
# you candecide if you want only the
# default stuff:
***************************
--------
Traceback (most recent call last):
File "pyinstaller.py", line 94, in <module>
run_build(opts, spec_file)
File "pyinstaller.py", line 50, in run_build
PyInstaller.build.main(spec_file, **opts.__dict__)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
build.py", line 1494, in main
build(specfile, buildpath)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
build.py", line 1393, in build
execfile(spec)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/MyApp/
MyApp.spec", line 3, in <module>
pathex=['/Users/mjpan/Downloads/python/pyinstaller.20110517'])
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
build.py", line 332, in __init__
self.__postinit__()
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
build.py", line 282, in __postinit__
self.assemble()
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
build.py", line 400, in assemble
analyzer.analyze_script(script)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
mf.py", line 568, in analyze_script
return self.analyze_r('__main__')
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
mf.py", line 460, in analyze_r
newnms = self.analyze_one(name, nm, imptyp, level)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
mf.py", line 521, in analyze_one
mod = self.doimport(nm, ctx, fqname)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
mf.py", line 609, in doimport
hooks = __import__('PyInstaller.hooks', globals(), locals(),
[hookmodnm])
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
hooks/hook-PIL.Image.py", line 29, in <module>
from PyInstaller.hooks.shared_PIL_Image import *
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
hooks/shared_PIL_Image.py", line 33, in <module>
install_Image(hiddenimports)
File "/Users/mjpan/Downloads/python/pyinstaller.20110517/PyInstaller/
hooks/shared_PIL_Image.py", line 21, in install_Image
import Image
ImportError: No module named Image
--
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.