I am testing an application that I created that, among other things, loads a couple of .png images upon opening. Images display correctly on my Mac (10.7.5) and my mother (10.8.5); however, when my sister opens it on her (10.9.5), images are not uploaded. All other functions are otherwise intact. I should note that on my Mac and my mother I installed Python 3.4 and many of the packages that the application uses, including the PIL package, while my sister does not have any of them. The application was created using the command:
python3.4 setup.py py2app
Images are imported into code using:
image = ImageTk.PhotoImage(file = "images/pic.png")
The setup file for py2app is as follows:
from setuptools import setup APP = ['myapp.py'] DATA_FILES = [('', ['images'])] OPTIONS = {'iconfile': 'myapp.icns', 'packages': ['PIL']} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], )
My guess is that this is a problem with PIL, it just doesn't want to play well with py2app. The reason I think it is PIL is because after running the command to create my application, I get the following error message in Terminal.
Modules not found (conditional imports): * Image (/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/py2app/recipes/PIL/prescript.py)
I would be very grateful for any suggestions or directions.
source share