Here is my spec file for mac. This should be a good starting point. Pay attention to the datas line. I have highlighted the items you will need to change.
I put my spec file in a subdirectory of my project, and use relative paths.
Note the datas line is tuples that specify (source file, destination directory)
# -*- mode: python -*-
import os
spec_root = os.path.abspath(SPECPATH)
block_cipher = None
app_name = 'ChaseBlissEditor'
mac_icon = '../Images/cb_256.icns'
a = Analysis(['../main.py'],
pathex=[spec_root],
binaries=[],
datas=[('../*.kv', '.'), ('../Images/*.png', './Images')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['_tkinter', 'Tkinter', 'enchant', 'twisted'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name=app_name,
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name=app_name)
app = BUNDLE(coll,
name=app_name + '.app',
icon=mac_icon,
bundle_identifier=None)
From: Eric B
Sent: Friday, April 3, 2020 11:42 AM
To: Kivy users support
Subject: [kivy-users] Creating an Executable on Mac
How do I turn my python file, kivy file and 3 images into an executable file that works on a Mac? Right now I just have a folder with my .py fil, my .kv file and my 3 images that are displayed from my .kv file. I have been trying this for the past 4-5 hours and haven't been able to get it to work.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4a8aa578-9635-498a-abf4-1ed947eac375%40googlegroups.com.
SPECPATH is a created by Pyinstaller. https://pyinstaller.readthedocs.io/en/stable/spec-files.html#globals-available-to-the-spec-file
SPECPATH is the path prefix to the SPEC value as returned by os.path.split().
Here is a brief video on relative file paths: https://www.youtube.com/watch?v=ephId3mYu9o
I only watched a few minutes – but it looks like it hits the key points.
If your spec file is in the Product directory you do not need the ../
The ../ means go back one directory and the to this destination.
‘.’ Refers to the current working directory.
If your specfile is in your Product directory you can simply say:
mac_icon = 'app_icon.icns'
You also do not need to list every .png file. You can use *.png
datas=[('main.kv','.'),('*.png','.')]
My project is structured like this:
Project Dir
Distribution Directory
Mac.spec – the spec file
Images
All my image files
Main.py – all my code
If you look at my original spec file, you can see how this directory structure is used. Using relative paths and a simlliar file structure each times allows me to reuse most of the spec file.
From: Eric B
Sent: Friday, April 3, 2020 1:39 PM
To: Kivy users support
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c6059064-dca9-4a02-ae22-7a46cec6cbf1%40googlegroups.com.
Give it a try and see what happens.
>pyinstaller -spec main.spec
Or if you don’t want to be asked about deleting a directory,
>pyinstaller -y -spec main.spec
Good luck!
From: Eric B
Sent: Friday, April 3, 2020 2:37 PM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
I think I should be ready to make my executable now. This is my current project structure:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/40edad95-0c78-4b38-afe7-8db334d48312%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Look at the kivy log, and see what it contains. It will provide clues for the next steps.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/465bf106-4e15-44ed-9ff7-00549becef43%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/465bf106-4e15-44ed-9ff7-00549becef43%40googlegroups.com.
Erics-MacBook-Air:~ eric$ /Users/eric/Desktop/Product/dist/Form.app/Contents/MacOS/main ; exit;
Traceback (most recent call last):
File "main.py", line 1, in <module>
ModuleNotFoundError: No module named 'kivy'
[34211] Failed to execute script main
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/465bf106-4e15-44ed-9ff7-00549becef43%40googlegroups.com.
On Apr 3, 2020, at 2:57 PM, Eric B <ericis...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/19f4ce0c-e755-4b4e-b85f-514258ed8a62%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/19f4ce0c-e755-4b4e-b85f-514258ed8a62%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4d6687e6-5b44-4089-a58c-4ee70241b41c%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4d6687e6-5b44-4089-a58c-4ee70241b41c%40googlegroups.com.
I don’t think what you are seeing in the missing module file is relevant. If you were missing a module you would see an error statement in the log.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c9483f74-9f19-432c-9f9a-edcbe3f8b8b1%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c9483f74-9f19-432c-9f9a-edcbe3f8b8b1%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c9483f74-9f19-432c-9f9a-edcbe3f8b8b1%40googlegroups.com.
A few things to try:
Add
import kivy
to the top of main.
Check the files in the created dist directory, are the kv file and png files where you would expect them to be? Especially the kv file.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/987a9cb6-4c48-43c0-aceb-a8c9c10cef68%40googlegroups.com.
260 INFO: PyInstaller: 3.6
261 INFO: Python: 3.8.1
273 INFO: Platform: macOS-10.13.6-x86_64-i386-64bit
276 INFO: UPX is not available.
278 INFO: Extending PYTHONPATH with paths
['/Users/eric/Desktop/Product', '/Users/eric/Desktop/Product/spec_root']
278 INFO: checking Analysis
278 INFO: Building Analysis because Analysis-00.toc is non existent
278 INFO: Initializing module dependency graph...
282 INFO: Caching module graph hooks...
294 INFO: Analyzing base_library.zip ...
4233 INFO: Processing pre-find module path hook distutils
4235 INFO: distutils: retargeting to non-venv dir '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8'
7038 INFO: Caching module dependency graph...
7165 INFO: running Analysis Analysis-00.toc
7179 INFO: Analyzing main.py
7184 INFO: Processing module hooks...
7185 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
7187 INFO: Loading module hook "hook-lib2to3.py"...
7196 INFO: Loading module hook "hook-encodings.py"...
7276 INFO: Loading module hook "hook-sysconfig.py"...
7292 INFO: Loading module hook "hook-xml.py"...
7354 INFO: Loading module hook "hook-pydoc.py"...
7356 INFO: Loading module hook "hook-distutils.py"...
7377 INFO: Looking for ctypes DLLs
7413 INFO: Analyzing run-time hooks ...
7417 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
7428 INFO: Looking for dynamic libraries
7685 INFO: Looking for eggs
7685 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.8/Python
7693 INFO: Warnings written to /Users/eric/Desktop/Product/build/main/warn-main.txt
7742 INFO: Graph cross-reference written to /Users/eric/Desktop/Product/build/main/xref-main.html
7754 INFO: Appending 'datas' from .spec
7757 INFO: checking PYZ
7757 INFO: Building PYZ because PYZ-00.toc is non existent
7757 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz
8280 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz completed successfully.
8290 INFO: checking PKG
8290 INFO: Building PKG because PKG-00.toc is non existent
8290 INFO: Building PKG (CArchive) PKG-00.pkg
11769 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
11774 INFO: Bootloader /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/bootloader/Darwin-64bit/runw
11774 INFO: checking EXE
11775 INFO: Building EXE because EXE-00.toc is non existent
11775 INFO: Building EXE from EXE-00.toc
11775 INFO: Appending archive to EXE /Users/eric/Desktop/Product/dist/main
11788 INFO: Fixing EXE for code signing /Users/eric/Desktop/Product/dist/main
11795 INFO: Building EXE from EXE-00.toc completed successfully.
11798 INFO: checking COLLECT
11798 INFO: Building COLLECT because COLLECT-00.toc is non existent
11799 INFO: Building COLLECT COLLECT-00.toc
12732 INFO: Building COLLECT COLLECT-00.toc completed successfully.
12739 INFO: checking BUNDLE
12739 INFO: Building BUNDLE because BUNDLE-00.toc is non existent
12739 INFO: Building BUNDLE BUNDLE-00.toc
12752 INFO: moving BUNDLE data files to Resource directory
It also still says that the module kivy cannot be found if I execute the program on the right (attached a picture with a green circle in it to clarify which file gave the result):
/Users/eric/Desktop/Product/dist/main ; exit;
Erics-MacBook-Air:~ eric$ /Users/eric/Desktop/Product/dist/main ; exit;
Traceback (most recent call last):
File "main.py", line 1, in <module>
ModuleNotFoundError: No module named 'kivy'
[37160] Failed to execute script main
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Finally, I'm not really sure where the kv file along with the pictures are supposed to be, see attached photo for where they are. In the photo you can see they are in the dist/Form folder
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/987a9cb6-4c48-43c0-aceb-a8c9c10cef68%40googlegroups.com.
I think this is the problem:
261 INFO: Python: 3.8.1
The default kivy installation does not run on Python 3.8
Your early log was showing it running on 3.7
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1ffafe1a-dd2f-4631-9697-a9495c045885%40googlegroups.com.
How do I turn my python file, kivy file and 3 images into an executable file that works on a Mac? Right now I just have a folder with my .py fil, my .kv file and my 3 images that are displayed from my .kv file. I have been trying this for the past 4-5 hours and haven't been able to get it to work.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4a8aa578-9635-498a-abf4-1ed947eac375%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1ffafe1a-dd2f-4631-9697-a9495c045885%40googlegroups.com.
Progress!
Check that your main.kv file is in the same directory under dist as your main.py file.
Check that main.kv is spelled correctly in your spec file ( or change it to *.kv)
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b0de0217-53c0-4fb8-8e5b-d35e91e50285%40googlegroups.com.
Erics-MacBook-Air:Product eric$ pyinstaller -spec main.spec
92 INFO: PyInstaller: 3.6
92 INFO: Python: 3.7.4
105 INFO: Platform: Darwin-17.7.0-x86_64-i386-64bit
109 INFO: UPX is not available.
110 INFO: Extending PYTHONPATH with paths
['/Users/eric/Desktop/Product', '/Users/eric/Desktop/Product/spec_root']
111 INFO: checking Analysis
111 INFO: Building Analysis because Analysis-00.toc is non existent
111 INFO: Initializing module dependency graph...
113 INFO: Caching module graph hooks...
125 INFO: Analyzing base_library.zip ...
3741 INFO: Caching module dependency graph...
3845 INFO: running Analysis Analysis-00.toc
3863 INFO: Analyzing main.py
4878 INFO: Processing pre-find module path hook distutils
4880 INFO: distutils: retargeting to non-venv dir '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7'
6330 INFO: Processing module hooks...
6331 INFO: Loading module hook "hook-encodings.py"...
6402 INFO: Loading module hook "hook-kivy.py"...
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_9.txt
6418 INFO: [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_9.txt
[INFO ] [Kivy ] v1.11.1
6417 INFO: [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
6418 INFO: [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
6418 INFO: [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
6419 INFO: [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
6430 INFO: [Factory ] 184 symbols loaded
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_10.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_11.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Audio ] Providers: audio_sdl2 (audio_ffpyplayer, audio_avplayer ignored)
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Camera ] Provider: avfoundation
[INFO ] [Clipboard ] Provider: sdl2(['clipboard_nspaste'] ignored)
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-10.36.26'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 6000'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[CRITICAL] [Spelling ] Unable to find any valuable Spelling provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
enchant - ModuleNotFoundError: No module named 'enchant'
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/spelling/spelling_enchant.py", line 12, in <module>
import enchant
osxappkit - ModuleNotFoundError: No module named 'AppKit'
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/spelling/spelling_osxappkit.py", line 16, in <module>
from AppKit import NSSpellChecker, NSMakeRange
[INFO ] [Text ] Provider: sdl2
[INFO ] [Video ] Provider: null(['video_ffmpeg', 'video_ffpyplayer'] ignored)
10158 INFO: Excluding import 'twisted'
10163 INFO: Removing import of twisted from module kivy.support
10164 INFO: Import to be excluded not found: 'tkinter'
10164 INFO: Excluding import '_tkinter'
10170 INFO: Loading module hook "hook-xml.dom.domreg.py"...
10171 INFO: Loading module hook "hook-docutils.py"...
11769 INFO: Loading module hook "hook-sysconfig.py"...
11781 INFO: Loading module hook "hook-xml.py"...
11783 INFO: Loading module hook "hook-pydoc.py"...
11785 INFO: Loading module hook "hook-distutils.py"...
11788 INFO: Loading module hook "hook-pygments.py"...
13716 INFO: Loading module hook "hook-pkg_resources.py"...
14055 INFO: Processing pre-safe import module hook win32com
14260 INFO: Excluding import '__main__'
14262 INFO: Removing import of __main__ from module pkg_resources
14263 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
14313 INFO: Looking for ctypes DLLs
14340 WARNING: library libmtdev.so.1 required via ctypes not found
14363 INFO: Analyzing run-time hooks ...
14371 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
14375 INFO: Including run-time hook 'pyi_rth_kivy.py'
14376 INFO: Including run-time hook 'pyi_rth_gstreamer.py'
14378 INFO: Including run-time hook 'pyi_rth_pkgres.py'
14397 INFO: Looking for dynamic libraries
14605 ERROR: Can not find path @executable_path/../../.dylibs/GStreamer (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/lib/gstplayer/_gstplayer.cpython-37m-darwin.so)
14664 ERROR: Can not find path @executable_path/webp (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/image/../../.dylibs/SDL2_image)
14679 ERROR: Can not find path ./OpusFile.framework/Versions/A/OpusFile (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/image/../../.dylibs/SDL2_mixer)
14706 INFO: Looking for eggs
14706 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.7/Python
14717 INFO: Warnings written to /Users/eric/Desktop/Product/build/main/warn-main.txt
14804 INFO: Graph cross-reference written to /Users/eric/Desktop/Product/build/main/xref-main.html
14844 INFO: Appending 'datas' from .spec
14860 INFO: checking PYZ
14861 INFO: Building PYZ because PYZ-00.toc is non existent
14861 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz
16032 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz completed successfully.
16067 INFO: checking PKG
16067 INFO: Building PKG because PKG-00.toc is non existent
16067 INFO: Building PKG (CArchive) PKG-00.pkg
22388 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
22401 INFO: Bootloader /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyInstaller/bootloader/Darwin-64bit/runw
22401 INFO: checking EXE
22401 INFO: Building EXE because EXE-00.toc is non existent
22401 INFO: Building EXE from EXE-00.toc
22401 INFO: Appending archive to EXE /Users/eric/Desktop/Product/dist/main
22428 INFO: Fixing EXE for code signing /Users/eric/Desktop/Product/dist/main
22434 INFO: Building EXE from EXE-00.toc completed successfully.
22445 INFO: checking COLLECT
22445 INFO: Building COLLECT because COLLECT-00.toc is non existent
22446 INFO: Building COLLECT COLLECT-00.toc
24432 INFO: Building COLLECT COLLECT-00.toc completed successfully.
24443 INFO: checking BUNDLE
24444 INFO: Building BUNDLE because BUNDLE-00.toc is non existent
24444 INFO: Building BUNDLE BUNDLE-00.toc
24497 INFO: moving BUNDLE data files to Resource directory
Erics-MacBook-Air:Product eric$
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b0de0217-53c0-4fb8-8e5b-d35e91e50285%40googlegroups.com.
Is your main.kv file is in the same directory under dist as your main.py file?
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/8d9ae85f-e2db-4504-8abb-03c244220f99%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/8d9ae85f-e2db-4504-8abb-03c244220f99%40googlegroups.com.
[INFO<span style="font-size:8.5pt;font-family:"Menlo",
Is there a form.app?
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/8ba61405-2e88-471e-8f5a-669cdfef88b0%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Delete the build and dist directories, and try building the app again.
If that doesn’t work, repost your spec file.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/eac45ba2-cf7a-4c7e-ac7a-480cc3d13d48%40googlegroups.com.
Last login: Sat Apr 4 11:04:07 on ttys000
/Users/eric/Desktop/dist/main ; exit;
Erics-MacBook-Air:~ eric$ /Users/eric/Desktop/dist/main ; exit;
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_35.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/var/folders/4s/nk6w74292_12k7jf2rs1qs9r0000gn/T/_MEIcRO474/kivy/__init__.pyc"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Users/eric/Desktop/dist/main"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-10.36.26'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 6000'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Base ] Start application main loop
Last login: Sat Apr 4 11:05:40 on ttys000
Erics-MacBook-Air:~ eric$ /Users/eric/Desktop/dist/Form/main ; exit;
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_36.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/var/folders/4s/nk6w74292_12k7jf2rs1qs9r0000gn/T/_MEIZYweRm/kivy/__init__.pyc"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Users/eric/Desktop/dist/Form/main"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-10.36.26'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 6000'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
[INFO ] [GL ] NPOT texture support is available
[INFO ] [Base ] Start application main loop
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/eac45ba2-cf7a-4c7e-ac7a-480cc3d13d48%40googlegroups.com.
Is 'app_icon.icns' a valid mac icon file? How was it created? Can you view it?
Error: pathex=['spec_root'],
Should be: pathex=[spec_root],
Change exe to:
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name=app_name,
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False)
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/409c44d2-77fc-459c-ae29-75ff610ad462%40googlegroups.com.
Erics-MacBook-Air:Product eric$ pyinstaller -spec main.spec
56 INFO: PyInstaller: 3.6
56 INFO: Python: 3.7.4
62 INFO: Platform: Darwin-17.7.0-x86_64-i386-64bit
65 INFO: UPX is not available.
67 INFO: Extending PYTHONPATH with paths
['/Users/eric/Desktop/Product', '/Users/eric/Desktop/Product']
67 INFO: checking Analysis
68 INFO: Building Analysis because Analysis-00.toc is non existent
68 INFO: Initializing module dependency graph...
70 INFO: Caching module graph hooks...
75 INFO: Analyzing base_library.zip ...
3250 INFO: Caching module dependency graph...
3353 INFO: running Analysis Analysis-00.toc
3360 INFO: Analyzing main.py
4172 INFO: Processing pre-find module path hook distutils
4173 INFO: distutils: retargeting to non-venv dir '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7'
5323 INFO: Processing module hooks...
5323 INFO: Loading module hook "hook-encodings.py"...
5390 INFO: Loading module hook "hook-kivy.py"...
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_37.txt
5405 INFO: [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_37.txt
[INFO ] [Kivy ] v1.11.1
5404 INFO: [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
5405 INFO: [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
5405 INFO: [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
5405 INFO: [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
5408 INFO: [Factory ] 184 symbols loaded
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_38.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_39.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Audio ] Providers: audio_sdl2 (audio_ffpyplayer, audio_avplayer ignored)
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Camera ] Provider: avfoundation
[INFO ] [Clipboard ] Provider: sdl2(['clipboard_nspaste'] ignored)
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-10.36.26'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 6000'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[CRITICAL] [Spelling ] Unable to find any valuable Spelling provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
enchant - ModuleNotFoundError: No module named 'enchant'
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/spelling/spelling_enchant.py", line 12, in <module>
import enchant
osxappkit - ModuleNotFoundError: No module named 'AppKit'
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/spelling/spelling_osxappkit.py", line 16, in <module>
from AppKit import NSSpellChecker, NSMakeRange
[INFO ] [Text ] Provider: sdl2
[INFO ] [Video ] Provider: null(['video_ffmpeg', 'video_ffpyplayer'] ignored)
8395 INFO: Excluding import 'twisted'
8400 INFO: Removing import of twisted from module kivy.support
8401 INFO: Excluding import '_tkinter'
8407 INFO: Import to be excluded not found: 'tkinter'
8407 INFO: Loading module hook "hook-xml.dom.domreg.py"...
8407 INFO: Loading module hook "hook-docutils.py"...
9746 INFO: Loading module hook "hook-sysconfig.py"...
9754 INFO: Loading module hook "hook-xml.py"...
9755 INFO: Loading module hook "hook-pydoc.py"...
9755 INFO: Loading module hook "hook-distutils.py"...
9756 INFO: Loading module hook "hook-pygments.py"...
11208 INFO: Loading module hook "hook-pkg_resources.py"...
11624 INFO: Processing pre-safe import module hook win32com
11663 INFO: Excluding import '__main__'
11665 INFO: Removing import of __main__ from module pkg_resources
11665 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
11710 INFO: Looking for ctypes DLLs
11736 WARNING: library libmtdev.so.1 required via ctypes not found
11755 INFO: Analyzing run-time hooks ...
11763 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
11770 INFO: Including run-time hook 'pyi_rth_kivy.py'
11772 INFO: Including run-time hook 'pyi_rth_pkgres.py'
11773 INFO: Including run-time hook 'pyi_rth_gstreamer.py'
11802 INFO: Looking for dynamic libraries
11971 ERROR: Can not find path @executable_path/../../.dylibs/GStreamer (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/lib/gstplayer/_gstplayer.cpython-37m-darwin.so)
12032 ERROR: Can not find path @executable_path/webp (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/image/../../.dylibs/SDL2_image)
12035 ERROR: Can not find path ./OpusFile.framework/Versions/A/OpusFile (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/core/image/../../.dylibs/SDL2_mixer)
12062 INFO: Looking for eggs
12062 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.7/Python
12073 INFO: Warnings written to /Users/eric/Desktop/Product/build/main/warn-main.txt
12157 INFO: Graph cross-reference written to /Users/eric/Desktop/Product/build/main/xref-main.html
12194 INFO: Appending 'datas' from .spec
12209 INFO: checking PYZ
12209 INFO: Building PYZ because PYZ-00.toc is non existent
12209 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz
13296 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz completed successfully.
13325 INFO: checking PKG
13325 INFO: Building PKG because PKG-00.toc is non existent
13325 INFO: Building PKG (CArchive) PKG-00.pkg
13347 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
13349 INFO: Bootloader /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyInstaller/bootloader/Darwin-64bit/runw
13349 INFO: checking EXE
13349 INFO: Building EXE because EXE-00.toc is non existent
13349 INFO: Building EXE from EXE-00.toc
13349 INFO: Appending archive to EXE /Users/eric/Desktop/Product/build/main/app_name
13355 INFO: Fixing EXE for code signing /Users/eric/Desktop/Product/build/main/app_name
13359 INFO: Building EXE from EXE-00.toc completed successfully.
13360 INFO: checking COLLECT
13360 INFO: Building COLLECT because COLLECT-00.toc is non existent
13360 INFO: Building COLLECT COLLECT-00.toc
15296 INFO: Building COLLECT COLLECT-00.toc completed successfully.
15316 INFO: checking BUNDLE
15316 INFO: Building BUNDLE because BUNDLE-00.toc is non existent
15316 INFO: Building BUNDLE BUNDLE-00.toc
15331 INFO: moving BUNDLE data files to Resource directory
name='app_name', should be name = app_name,
No quotes.
just copy and paste. No changes.
From: Eric B
Sent: Saturday, April 4, 2020 8:37 AM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
When I did these changes, now the Form.app wouldn't open, but the app_name file opened in the dist/Form directory.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/8142e1fc-3c67-425d-a03d-0a4b5d204d3f%40googlegroups.com.
Last login: Sat Apr 4 11:53:47 on ttys000
Erics-MacBook-Air:~ eric$ cd Desktop/Product/
Erics-MacBook-Air:Product eric$ pyinstaller -spec main.spec
57 INFO: PyInstaller: 3.6
57 INFO: Python: 3.7.4
63 INFO: Platform: Darwin-17.7.0-x86_64-i386-64bit
67 INFO: UPX is not available.
69 INFO: Extending PYTHONPATH with paths
['/Users/eric/Desktop/Product', '/Users/eric/Desktop/Product']
69 INFO: checking Analysis
69 INFO: Building Analysis because Analysis-00.toc is non existent
69 INFO: Initializing module dependency graph...
71 INFO: Caching module graph hooks...
76 INFO: Analyzing base_library.zip ...
3275 INFO: Caching module dependency graph...
3380 INFO: running Analysis Analysis-00.toc
3388 INFO: Analyzing main.py
4191 INFO: Processing pre-find module path hook distutils
4192 INFO: distutils: retargeting to non-venv dir '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7'
5347 INFO: Processing module hooks...
5347 INFO: Loading module hook "hook-encodings.py"...
5414 INFO: Loading module hook "hook-kivy.py"...
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_55.txt
5429 INFO: [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_55.txt
[INFO ] [Kivy ] v1.11.1
5428 INFO: [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
5429 INFO: [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
5430 INFO: [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
5430 INFO: [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
5432 INFO: [Factory ] 184 symbols loaded
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_56.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3"
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Logger ] Record log in /Users/eric/.kivy/logs/kivy_20-04-04_57.txt
8442 INFO: Excluding import 'twisted'
8446 INFO: Removing import of twisted from module kivy.support
8447 INFO: Import to be excluded not found: 'tkinter'
8447 INFO: Excluding import '_tkinter'
8453 INFO: Loading module hook "hook-xml.dom.domreg.py"...
8454 INFO: Loading module hook "hook-docutils.py"...
9854 INFO: Loading module hook "hook-sysconfig.py"...
9862 INFO: Loading module hook "hook-xml.py"...
9863 INFO: Loading module hook "hook-pydoc.py"...
9863 INFO: Loading module hook "hook-distutils.py"...
9864 INFO: Loading module hook "hook-pygments.py"...
11319 INFO: Loading module hook "hook-pkg_resources.py"...
11559 INFO: Processing pre-safe import module hook win32com
11778 INFO: Excluding import '__main__'
11779 INFO: Removing import of __main__ from module pkg_resources
11780 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
11829 INFO: Looking for ctypes DLLs
11856 WARNING: library libmtdev.so.1 required via ctypes not found
11874 INFO: Analyzing run-time hooks ...
11882 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
11886 INFO: Including run-time hook 'pyi_rth_kivy.py'
11887 INFO: Including run-time hook 'pyi_rth_pkgres.py'
11888 INFO: Including run-time hook 'pyi_rth_gstreamer.py'
11904 INFO: Looking for dynamic libraries
12085 ERROR: Can not find path @executable_path/../../.dylibs/GStreamer (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/lib/gstplayer/_gstplayer.cpython-37m-darwin.so)
12132 ERROR: Can not find path @executable_path/webp (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/graphics/cgl_backend/../../.dylibs/SDL2_image)
12135 ERROR: Can not find path ./OpusFile.framework/Versions/A/OpusFile (needed by /Users/eric/Library/Python/3.7/lib/python/site-packages/kivy/graphics/cgl_backend/../../.dylibs/SDL2_mixer)
12162 INFO: Looking for eggs
12163 INFO: Using Python library /Library/Frameworks/Python.framework/Versions/3.7/Python
12172 INFO: Warnings written to /Users/eric/Desktop/Product/build/main/warn-main.txt
12252 INFO: Graph cross-reference written to /Users/eric/Desktop/Product/build/main/xref-main.html
12290 INFO: Appending 'datas' from .spec
12305 INFO: checking PYZ
12305 INFO: Building PYZ because PYZ-00.toc is non existent
12305 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz
13405 INFO: Building PYZ (ZlibArchive) /Users/eric/Desktop/Product/build/main/PYZ-00.pyz completed successfully.
13435 INFO: checking PKG
13435 INFO: Building PKG because PKG-00.toc is non existent
13435 INFO: Building PKG (CArchive) PKG-00.pkg
13455 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
13457 INFO: Bootloader /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyInstaller/bootloader/Darwin-64bit/runw
13457 INFO: checking EXE
13457 INFO: Building EXE because EXE-00.toc is non existent
13457 INFO: Building EXE from EXE-00.toc
13457 INFO: Appending archive to EXE /Users/eric/Desktop/Product/build/main/Form
13463 INFO: Fixing EXE for code signing /Users/eric/Desktop/Product/build/main/Form
13467 INFO: Building EXE from EXE-00.toc completed successfully.
13469 INFO: checking COLLECT
13469 INFO: Building COLLECT because COLLECT-00.toc is non existent
13469 INFO: Building COLLECT COLLECT-00.toc
15388 INFO: Building COLLECT COLLECT-00.toc completed successfully.
15400 INFO: checking BUNDLE
15400 INFO: Building BUNDLE because BUNDLE-00.toc is non existent
WARNING: The output directory "/Users/eric/Desktop/Product/dist/Form" and ALL ITS CONTENTS will be REMOVED! Continue? (y/N)
This is also my updated spec file:
# -*- mode: python ; coding: utf-8 -*-
import os
spec_root = os.path.abspath(SPECPATH)
block_cipher = None
app_name='Form'
mac_icon = 'app_icon.icns'
a = Analysis(['main.py'],
pathex=[spec_root],
binaries=[],
datas=[('*.kv','.'),('*.png','.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['_tkinter', 'Tkinter', 'enchant', 'twisted'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name=app_name,
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name=app_name)
app = BUNDLE(exe,
name=app_name,
icon=mac_icon,
bundle_identifier=None)
Also this is my new updated spec file:
When you see the message:
WARNING: The output directory "/Users/eric/Desktop/Product/dist/Form" and ALL ITS CONTENTS will be REMOVED! Continue? (y/N)
Press y
From: Eric B
Sent: Saturday, April 4, 2020 9:04 AM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
I don't think it it included everything I put in my last message so this is the cut off part (still look at the highlighted part of the console):
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/af1a8421-a6ba-4859-adfb-574c6e4c0b5c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
What is in dist?
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9bb2417a-0751-40f3-b0da-90c5ae5b6638%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9bb2417a-0751-40f3-b0da-90c5ae5b6638%40googlegroups.com.
What is in dist/form?
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9fb7adb0-635f-4987-b8b6-b714da7ed3e7%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9fb7adb0-635f-4987-b8b6-b714da7ed3e7%40googlegroups.com.
On Apr 4, 2020, at 10:33 AM, Eric B <ericis...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/eca1307f-309e-4b80-9a9a-cb22e5ffffd8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/eca1307f-309e-4b80-9a9a-cb22e5ffffd8%40googlegroups.com.
On Apr 4, 2020, at 4:12 PM, Eric B <ericis...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f4b1d158-4b4e-4eac-bb42-de186e8ef6bd%40googlegroups.com.
On Apr 4, 2020, at 5:09 PM, Eric B <ericis...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/9428c999-d496-47d4-8c5a-76d30e123f39%40googlegroups.com.
I suspect the ‘install certificates’ command is getting installed with your bundle by default, search your build dir to check. If not try adding it to hidden imports, or look at the pyinstaller documentation for adding a binary file to the bundle.
In your code add a try/except block around the code that includes the call that is throwing the exception. In the except block, use the suprocess call to execute the ‘install certificates’ command. https://docs.python.org/3.7/library/subprocess.html
From: Eric B
Sent: Sunday, April 5, 2020 6:19 AM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
I was able to kind of fix this, but the way it gets fixed is I have to run a File in Mactintosh HD > Applications > Python 3.7 > Install Certificates.command. This then makes it work if I run the program on other people computers but then they wouldalso need to install python 3.7 and pip for this all to work.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/2dbcdf9e-51bc-4870-bcae-d1328edbaf9a%40googlegroups.com.
Here is info on the subprocess: https://pymotw.com/3/subprocess/index.html
I would expect something like:
import subprocess
subprocess.run(‘install certificates’) # think of this as running something on the command line
I think the exception you are catching is: ssl.SSLCertVerificationError
In development do this:
try:
log in
except Exception as e:
print(f’The Exception was {e}’)
and use that data to set the exception you are catching.
From: Eric B
Sent: Sunday, April 5, 2020 11:41 AM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
I'm unsure how I would go about doing this. I know that I would do something along the lines of:
Try:
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/846e3794-39da-4351-9fa8-c09408d1415d%40googlegroups.com.
Here is info on the subprocess: https://pymotw.com/3/subprocess/index.html
I would expect something like:
import subprocess
subprocess.run(‘install certificates’) # think of this as running something on the command line
I think the exception you are catching is: ssl.SSLCertVerificationError
In development do this:
try:
log in
except Exception as e:
print(f’The Exception was {e}’)
and use that data to set the exception you are catching.
From: Eric B
Sent: Sunday, April 5, 2020 11:41 AM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
I'm unsure how I would go about doing this. I know that I would do something along the lines of:
Try:logging in
Except (ssl error excpetion)
subprocess thingy
But I don't know how to do the subprocess thingy part or what exception it would give. Any help is appreciated
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Try using just:
except:
print(‘Caught’)
exit(-1)
show the trace log.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/76ecd33d-7061-496c-900d-322e018c20c5%40googlegroups.com.
This is the error I get when I do that:
[INFO ] Logger: Record log in /Users/h/.kivy/logs/kivy_20-04-05_14.txt [INFO ] Kivy: v1.11.1 [INFO ] Kivy: Installed at "/private/var/folders/br/sxpnwqvn0p72cmhfz7vgm67r0000gn/T/AppTranslocation/617DB5B8-61CB-4648-9131-54FEFFA16000/d/Display-10.app/Contents/MacOS/kivy/__init__.pyc" [INFO ] Python: v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] [INFO ] Python: Interpreter at "/private/var/folders/br/sxpnwqvn0p72cmhfz7vgm67r0000gn/T/AppTranslocation/617DB5B8-61CB-4648-9131-54FEFFA16000/d/Display-10.app/Contents/MacOS/Display" [INFO ] Factory: 184 symbols loaded [INFO ] Image: Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored) [INFO ] Window: Provider: sdl2 [INFO ] GL: Using the "OpenGL ES 2" graphics system [INFO ] GL: Backend used <sdl2> [INFO ] GL: OpenGL version <b'2.1 INTEL-10.2.37'> [INFO ] GL: OpenGL vendor <b'Intel Inc.'> [INFO ] GL: OpenGL renderer <b'Intel HD Graphics 3000 OpenGL Engine'> [INFO ] GL: OpenGL parsed version: 2, 1 [INFO ] GL: Shading version <b'1.20'> [INFO ] GL: Texture max size <8192> [INFO ] GL: Texture max units <16> [INFO ] Window: auto add sdl2 input provider [INFO ] Window: virtual keyboard not allowed, single mode, not docked [INFO ] Base: Start application main loop [INFO ] Text: Provider: sdl2 [INFO ] GL: NPOT texture support is available [INFO ] Base: Leaving application in progress... [WARNING] stderr: Traceback (most recent call last): [WARNING] stderr: File "display.py", line 24, in email_read [WARNING] stderr: File "imapclient/imapclient.py", line 254, in __init__ [WARNING] stderr: File "imapclient/imapclient.py", line 289, in _create_IMAP4 [WARNING] stderr: File "imapclient/tls.py", line 44, in __init__ [WARNING] stderr: File "imaplib.py", line 198, in __init__ [WARNING] stderr: File "imapclient/tls.py", line 50, in open [WARNING] stderr: File "imapclient/tls.py", line 32, in wrap_socket [WARNING] stderr: File "ssl.py", line 423, in wrap_socket [WARNING] stderr: File "ssl.py", line 870, in _create [WARNING] stderr: File "ssl.py", line 1139, in do_handshake [WARNING] stderr: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076) [WARNING] stderr: [WARNING] stderr: During handling of the above exception, another exception occurred: [WARNING] stderr: [WARNING] stderr: Traceback (most recent call last): [WARNING] stderr: File "display.py", line 103, in <module> [WARNING] stderr: File "kivy/app.py", line 855, in run [WARNING] stderr: File "kivy/base.py", line 504, in runTouchApp [WARNING] stderr: File "kivy/core/window/window_sdl2.py", line 747, in mainloop [WARNING] stderr: File "kivy/core/window/window_sdl2.py", line 479, in _mainloop [WARNING] stderr: File "kivy/base.py", line 339, in idle [WARNING] stderr: File "kivy/clock.py", line 591, in tick [WARNING] stderr: File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events [WARNING] stderr: File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events [WARNING] stderr: File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events [WARNING] stderr: File "kivy/_clock.pyx", line 167, in kivy._clock.ClockEvent.tick [WARNING] stderr: File "display.py", line 27, in email_read [WARNING] stderr: NameError: name 'exit' is not defined
This is what I put for the python code the function starts on line 22:
def email_read(dt):
try:
mail_obj = imapclient.IMAPClient('imap.gmail.com', 993)
except:
print('Caught')
exit(-1)
mail_obj.login('formem...@gmail.com', 'gvauyhpltyyuyinp')
mail_obj.select_folder('INBOX', readonly=False)
uid = mail_obj.search(['UNSEEN'])
global add_element
if uid == []:
add_element = False
else:
add_element = True
for i in uid:
raw_msg = mail_obj.fetch(i, ['BODY[]'])
msg = pyzmail.PyzMessage.factory(raw_msg[i][b'BODY[]'])
ref_msg = msg.text_part.get_payload().decode("utf-8").strip('\r\n').replace("^", ":").split("#")
std_name.append(ref_msg[0])
grade.append(ref_msg[1])
reason.append(ref_msg[2])
leave_time.append(ref_msg[4])
return_time.append(ref_msg[3])
mail_obj.delete_messages(i)
mail_obj.logout()
Oops
Add
from sys import exit
From: Eric B
Sent: Sunday, April 5, 2020 2:11 PM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
This is the error I get when I do that:--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/cd86b74b-5592-4be8-bc2e-c3061e0176cb%40googlegroups.com.
This is the log I got, I highlighted theimportant part
Last login: Sun Apr 5 17:56:18 on ttys000
kween:~b$ /Users/h/Desktop/Display-11.app/Contents/MacOS/Display ; exit;
[INFO ] [Logger ] Record log in /Users/h/.kivy/logs/kivy_20-04-05_19.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/h/Desktop/Display-11.app/Contents/MacOS/kivy/__init__.pyc"
[INFO ] [Python ] v3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)]
[INFO ] [Python ] Interpreter at "/Users/h/Desktop/Display-11.app/Contents/MacOS/Display"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-10.2.37'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel HD Graphics 3000 OpenGL Engine'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <8192>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Base ] Start application main loop
[INFO ] [Text ] Provider: sdl2
[INFO ] [GL ] NPOT texture support is available
Caught
The Exception was [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)
[INFO ] [Base ] Leaving application in progress...
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
You’ve caught the exception, now use subprocess to install the certificate.
After that is working you can try to be more specific on the exception. Catching all exceptions like that is bad form – and can hide bugs.
From: Eric B
Sent: Sunday, April 5, 2020 2:57 PM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
This is the log I got, I highlighted theimportant part
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c7a206ae-3feb-4a0f-891a-80397a374492%40googlegroups.com.
Excellent!
From: Eric B
Sent: Monday, April 6, 2020 6:29 AM
To: Kivy users support
Subject: Re: [kivy-users] Creating an Executable on Mac
I made it work, thanks for all your help!
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/40de4e4c-fe27-4602-9a9f-c1281ac2119f%40googlegroups.com.