I get a warning when trying to create an exectable file using pyinstaller . This warning appeared after installing Pillow . I used to get any warnings from a neur and was able to do this.
warning i get with pyinstaller:
7314 INFO: Analyzing main.py /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller-2.1.1dev_-py2.7.egg/PyInstaller/hooks/hook-PIL.Image.py:14: RuntimeWarning: Parent module 'PyInstaller.hooks.hook-PIL' not found while handling absolute import from PyInstaller.hooks.shared_PIL_Image import *
Also, when I tried to run the exe / consol executable version of my code, which is inside the dist folder created by pyinstaller ( dist/main/main ), they are displayed.
Traceback (most recent call last): File "<string>", line 26, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller-2.1.1dev_-py2.7.egg/PyInstaller/loader/pyi_importers.py", line 276, in load_module exec(bytecode, module.__dict__) File "/Users/..../build/main/out00-PYZ.pyz/PIL.PngImagePlugin", line 40, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller-2.1.1dev_-py2.7.egg/PyInstaller/loader/pyi_importers.py", line 276, in load_module exec(bytecode, module.__dict__) File "/Users/..../build/main/out00-PYZ.pyz/PIL.Image", line 53, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyInstaller-2.1.1dev_-py2.7.egg/PyInstaller/loader/pyi_importers.py", line 276, in load_module exec(bytecode, module.__dict__) File "/Users/..../build/main/out00-PYZ.pyz/FixTk", line 74, in <module> OSError: [Errno 20] Not a directory: '/Users/.../dist/main/tcl' logout [Process completed]
so I tried uninstalling Pillow by installing the tk tcl dev version. And then install Pillow . Even that didn't help.
I also tried reinstalling pyinstaller . didn't help either
Update 1:
It seems the Pyinstaller.hooks.hook-PIL.py file Pyinstaller.hooks.hook-PIL.py not in the Pyinstaller/hooks directory. And it was absent on all platforms (Mac, windows and linux). This is a warning / error message that I get on windows that I received on Mac and on Linux.
Later I found a link that said its just to need Python import machinery happy . therefore, I created as I said so. Then I do not get the same error on all platforms, but on mac I still get PILImagePlugin , Image and FixTk