--
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/779b4a7c-0ef6-4253-8a27-23b397f3c234%40googlegroups.com.
The problem you have is that you need to tell pyinstaller where the .kv files are located. The datas section in the kv file is used for this.
You have also not captured some of dependencies. There is a section on kivy.org for packaging apps.
I have attached a specfile I use for packaging kivy apps on Windows10. You will need to change the app_name and win_icon as appropriate. Then run:
Pyinstaller -spec w10.spec
I usually make a 1 directory build, and then package the file into an installable executable using Inno Setup. It make a very nice Windows Installer, and has a wizard that makes it very easy to use. http://www.jrsoftware.org/isinfo.php
--
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e0229df.1c69fb81.10854.7347SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Can you create a .exe from a small example successfully?
Create a small test app, and see if you can package it. If that works can move from there.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAMuWiPkoXuk7Lyb9g8Rz5-YcURL6O3em7QkoU3e4ey%2BEiv2TWw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e02b146.1c69fb81.1fc3d.f72fSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
On Dec 24, 2019, at 7:33 PM, Will Tejeda <in...@willtejeda.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAMuWiPnmiK-jC86i3LQUFh9WqLKyFyJum4Qo89-%2BqWqtnsLFMw%40mail.gmail.com.
Have you tried using the spec file I sent? Edit to match your program. Share a list of the files in your project if you need some help.
Create a directory, under your project directory. Call in myappdist
Put the spec file there
change to that directory
then run pyinstaller: pyinstaller -spec w10.spec
you should have a directory called dist with the .exe in it. You can run this file. If there is any problem look at the kivy log file for clues.
Then start the Inno Setup complier, select create a new script file using the Script Wizard. Fill in the forms. This will create an installer and uninstaller.
It will run, package up and install your program into and installable exe.
Good luck!
From: Electronic Part
Sent: Tuesday, December 24, 2019 10:28 PM
To: Kivy users support
Subject: Re: [kivy-users] Tried to make an exe file
Thanks for your help. Could you tell me all commands that i need to make an exe by pyinstaller?
--
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/e3521c5d-b4fd-4d88-8a9d-098d9f8cc370%40googlegroups.com.
Thanks for your help. Could you tell me all commands that i need to make an exe by pyinstaller?
--
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/e3521c5d-b4fd-4d88-8a9d-098d9f8cc370%40googlegroups.com.
Try using this spec file, as I attached previously. Here are a few details to understand.
# -*- mode: python -*-
import os
from kivy_deps import sdl2, glew
spec_root = os.path.abspath(SPECPATH)
block_cipher = None
app_name = 'Your App Name Here'
win_icon = '../YourIconFileHere.ico'
a = Analysis(['../main.py'],
pathex=[spec_root],
datas=[('../*.kv', '.'), ('../*.png', '.')],
hiddenimports=['win32timezone'],
hookspath=[],
runtime_hooks=[],
excludes=[],
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,
icon=win_icon)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
strip=False,
upx=False,
name=app_name)
From: Electronic Part
Sent: Wednesday, December 25, 2019 12:06 AM
To: kivy-...@googlegroups.com
Subject: Re: [kivy-users] Tried to make an exe file
I tried hello world . I got the same error. I think something is wrong with pyinstaller installation. I have attached the hello word file(there is
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shToRHeLToVbtfzrp11Q%3D%2B8wR3zFBFrSE_pib5CRX6NZcg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e03576a.1c69fb81.d4f5e.58aaSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Pyinstaller -spec w10.spec
no .kv file)
This is the error
[CRITICAL] [App ] Unable to get a Window, abort.
Command i used pyinstaller --onefile test3.py
Please help me
On Wed, Dec 25, 2019 at 8:58 AM Electronic Part <hsiel...@gmail.com> wrote:
Thanks for your help. Could you tell me all commands that i need to make an exe by pyinstaller?
--
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/e3521c5d-b4fd-4d88-8a9d-098d9f8cc370%40googlegroups.com.--
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/CAGb7shToRHeLToVbtfzrp11Q%3D%2B8wR3zFBFrSE_pib5CRX6NZcg%40mail.gmail.com.
--
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/5e03576a.1c69fb81.d4f5e.58aaSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
--
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/CAGb7shR%2B97T4S0Q7oXJkr-obe25zjrsi6n6Qcaw-8%2BnC3ZNF%3Dg%40mail.gmail.com.
If your file name is not main you would need to change the first line in the Analysis section to point to your .py file.
This is the error
[CRITICAL] [App ] Unable to get a Window, abort.
Command i used pyinstaller --onefile test3.py
Please help me
On Wed, Dec 25, 2019 at 8:58 AM Electronic Part <hsiel...@gmail.com> wrote:
Thanks for your help. Could you tell me all commands that i need to make an exe by pyinstaller?
--
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/e3521c5d-b4fd-4d88-8a9d-098d9f8cc370%40googlegroups.com.--
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/CAGb7shToRHeLToVbtfzrp11Q%3D%2B8wR3zFBFrSE_pib5CRX6NZcg%40mail.gmail.com.
--
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/5e03576a.1c69fb81.d4f5e.58aaSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
--
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/CAGb7shR%2B97T4S0Q7oXJkr-obe25zjrsi6n6Qcaw-8%2BnC3ZNF%3Dg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e035db6.1c69fb81.82bc8.09a5SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Create a small test app. Share the app and the spec file. Let me know where the files are located, and I can suggest how to resolve the issue.
The name of the dependencies changed in the transition to 1.11, ( what was previously a ‘.’ Changed to an ‘_’). if you had a spec file you were using previously it would need to be updated.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shTsV3M19D3G5aaFaOteSa6Zwzd5Tz6enZXC_WJfTDt71w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e04c0b2.1c69fb81.a643.f905SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Here are a few comments that go with the highlights below.
I’m mot familiar with these from and too lines, but they cause an error for me.
I’ve found that windows will accept the/file/separator/ on input to all file and path related functions. It will return //, but it will accept /.
The variable app_name has not been defined. The app name goes in 2 places, So I create a variable app_name at the top of the file, and put it in 2 places, you have put ‘test3’ in the EXE section, you should also put ‘test3’ in Collections.
I would expect those 2 Tree statements would work fine. I’m using: *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)]
The specfile is python code, it can be helpful to add print statements to see what is being created.
# -*- mode: python ; coding: utf-8 -*-
From: [Python]\share\sdl2\bin\libpng16-16.dll
To: [Dist]\<projectName>\libpng16-16.dll
import os
from kivy_deps import sdl2, glew
spec_root = os.path.abspath(SPECPATH)
block_cipher = None
a = Analysis(['test3.py'],
pathex=['spec_root'],
binaries=[],
datas=['spec_root\\test3.kv','.'],
hiddenimports=['win32timezone'],
hookspath=[],
runtime_hooks=[],
excludes=[],
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,
a.binaries,
a.zipfiles,
a.datas,
[],
name='test3',
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
Tree('D:\\ProgramData\\Anaconda3\\envs\\conda_evnv\\share\\sdl2\\bin\\'),
Tree('D:\\ProgramData\\Anaconda3\\envs\\conda_evnv\\share\\glew\\bin\\'),
strip=False,
upx=False,
name=app_name)
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shQ6QAnit3u0Y_MG7em_YB%2B%3D3bsCuQnTi1APuO474jFhCA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e076073.1c69fb81.df70a.b5a8SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Does the app run properly when you are not under pyinstaller? Glew, kivy and sdl deps are not in your list of packages.
The error message says, “ Unable to find any valuable Window 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.
Have you run with the debug logging enabled?
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shQmeb9hNFqBeG%2BeT48zsrim9D3rJL5r0FSr6-kOEDQ%3D-A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e083ae5.1c69fb81.398b6.0d47SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
On Dec 28, 2019, at 10:42 PM, Electronic Part <hsiel...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shTe0-cLjvH84_daJ6FKan2Gy6L4i8Bm1-quSi4nri3pVw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/08857CA3-97CD-431C-8366-A61EF23F2D57%40cox.net.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/08857CA3-97CD-431C-8366-A61EF23F2D57%40cox.net.
Try making the file with pyinstaller -spec test3.spec
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shS%2Bqp%2BAQ-FARa5b8vjR_RH6Osdmwi80gwhNJRmydMGOmA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e084643.1c69fb81.c5f85.dbdbSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
On Dec 29, 2019, at 12:59 AM, Electronic Part <hsiel...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shS%3DX%2Byz8njxayZOoVEKJR0TGGDE8TX-7KJQCdcvgUs3Rg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/25A73C90-B513-4C57-BE9E-B17DF480EDB7%40cox.net.
File "test3.spec", line 17, in <module>
noarchive=False)It has the file.... is there something Wong near line 17?Sent from my iPadOn Dec 29, 2019, at 4:27 AM, Electronic Part <hsiel...@gmail.com> wrote:File "test3.spec", line 17, in <module>
noarchive=False)
--
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/9B25DC7B-794C-4951-A25F-3A3305EE033D%40cox.net.
I use pyinstaller all of the time. I packaged an app on kivy for Windows10 and mac earlier this week.
Pyinstaller is very complex, and the documentation is difficult to understand. Keep at it – I know you can make it work.
The spec file test6.spec is missing all of the kivy specific code. Here my working specfile for kivy windows 10 builds. This should work fine on Windows 7.
try building your exe with this file as is. Change the name of your app to main.py. The app name will be wrong, and you won't have the icon file but you can fix that later.
I use a venv or pipenv you may have a complicaiton due to your conda install. It looks like you have a venv on top of a venv.
I'd suggest creating a new venv, add kivy and pyintaller, see if you can get things building. Then either add kivy and pyinstaller to a conda venv, and do a simple build.
I think something is wrong with kivy and pyinstaller together. I tried all the things you said for a code which is simply print something to the screen and that works without any problem.
On Sun, Dec 29, 2019 at 3:32 PM Electronic Part <hsiel...@gmail.com> wrote:
Let's start from the beginning . How to make spec file from pyinstaller.
On Sun, Dec 29, 2019 at 3:22 PM Electronic Part <hsiel...@gmail.com> wrote:
This is line 17noarchive=False)
On Sun, Dec 29, 2019 at 3:20 PM Elliot Garbus <elli...@cox.net> wrote:
File "test3.spec", line 17, in <module>--
noarchive=False)It has the file.... is there something Wong near line 17?Sent from my iPadOn Dec 29, 2019, at 4:27 AM, Electronic Part <hsiel...@gmail.com> wrote:File "test3.spec", line 17, in <module>
noarchive=False)
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.
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/590b807d-70aa-4042-97d7-ec2006c1c025%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/590b807d-70aa-4042-97d7-ec2006c1c025%40googlegroups.com.
Glad you have it running!
Just a warning: The line:
Tree('examples-path\\demo\\touchtracer\\'),
Puts all of your source code in the bundle. If you don’t want to ship all of your .py files to your users, you would replace this line and put the name and location you want your data files, using the datas[] section of the spec file.
From: Electronic Part
Sent: Monday, December 30, 2019 4:35 AM
To: kivy-...@googlegroups.com
Subject: Re: [kivy-users] Tried to make an exe file
Here was my answer. I could solve it for hello world example
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shToE520zBiGAURLhvSo4J2BNBXgkx0NsBmDyGmO3H3MEw%40mail.gmail.com.
try:
with open(dirpath+"/test.kv", encoding='utf-8') as f: # Note the name of the .kv
kv = Builder.load_string(f.read())
except:
with open(current_folder_path+"/test.kv", encoding='utf-8') as f: # Note the name of the .kv
To add a kv file to Pyinstaller, you add the file to the datas list, and tell Pyinstaller where you would like to put it. You can also list images and any other data files.
For example:
datas=[('../*.kv', '.'), ('../Images/*.png', './Images'), ( '../*.mep', '.')],
I have my .spec file in a directory below my project file, and run pyinstaller from that directory. The tuples tell pyinstaller to get all the kv files and put them in the current working directory. I do not have to make any changes to my python code.
https://pythonhosted.org/PyInstaller/spec-files.html#adding-data-files
For files that are imported by KV, I simply add an additional import to python code. This allows Pyinstaller to find the file, and does not require any change to the Pyinstaller file. This has allowed me to use the same pyinstaller file with only minor modifications.
So if a .kv file includes:
#:import pathlib pathlib
In a .py file I would add:
Import pathlib # required for pyinstaller (The comment is a reminder why the import is included.
An alternative would be to add the imports to the hidden imports list in pyinstaller
From: Electronic Part
Sent: Tuesday, December 31, 2019 3:49 AM
To: kivy-...@googlegroups.com
Subject: Re: [kivy-users] Tried to make an exe file
I found an answer for adding .kv file. So, I change test.py to this. The rest of the code is the same. I still do't have any answer for my first question.
--
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/CAGb7shRshsupWLU1kSsr-CZjGCJxXPZNOqkHer7iyrX4Ng1LcA%40mail.gmail.com.
datas=[('../*.kv', '.'), ('../Images/*.png', './Images'), ( '../*.mep', '.')],
I don't know exactly what i have to out as a path for ../*.please give me an example
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e0b39db.1c69fb81.d6dda.8c3fSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
If all your files are in the same directory and you put your spec file in that directory, then your data file would be:
datas=[('*.kv', '.'), ('Images/*.png', './Images'), ( '*.mep', '.')],
../ means go up one level in the directory hierarchy.
You can go to the command line and (on windows) tyoe:
dir ../
and you will see the directory of the parent directory
or simply ‘.’ Is the current working directory; ‘..’ is the parent directory
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shS4vms82nq0MZYoqTgGCxfO9UXdVtrrLWBQcBXq-dvcew%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e0b3dc6.1c69fb81.7b8c.b164SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
On Jan 1, 2020, at 6:09 AM, Electronic Part <hsiel...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAGb7shTsH-9hkp1Z%2BQ-X4pL%2Bom%3D%2BBay276kDZRYJui-BrECReA%40mail.gmail.com.