# -*- mode: python -*-
from kivy_deps import sdl2, glew
block_cipher = None
a = Analysis(['C:\\Users\\Artur\\PycharmProjects\\Gameficacao\\Gameficacao.py'],
pathex=['C:\\Users\\Artur\\Desktop\\Trabalho\\Gameficação\\Pasta1\\Delevopment\\Build\\pc\\MyHiddenImports'],
binaries=[],
datas=[],
hiddenimports=['MyHiddenImports'],
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)
a.datas += [('Gameficacao.kv', 'C:\\Users\\Artur\\PycharmProjects\\Gameficacao\\Gameficacao.kv', 'DATA')]
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
name='gameficacao',
debug=False,
strip=False,
upx=True,
console=True )
Here is a spec file for Windows10. I uses a small variation of this across many projects. The issue with your file is you need to specify the .kv file in the datas list.
Looking at the kivy log file will provide clues on the program is not running correctly.
# -*- mode: python -*-
import os
from kivy_deps import sdl2, glew
spec_root = os.path.abspath(SPECPATH)
block_cipher = None
app_name = 'You App Name Here'
win_icon = 'YourWindowsIconFileHere.ico'
a = Analysis(['../main.py'],
pathex=[spec_root],
datas=[('../*.kv', '.'), ('../Images/*.png', './Images')],
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)
--
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/f69a8a99-b992-44f3-baf3-c80c7de4bc95o%40googlegroups.com.
So, I've tried this code, and unfortenatelly the problem persists, only now it seems like the program doesn't open at all. I've tried the simple way as described by you, withoutchanging much, and it didn't work, so I tried to combine what other people on internet were saying and the code became that:
# -*- mode: python -*-
import os
from kivy_deps import sdl2, glew
spec_root = os.path.abspath(SPECPATH)
block_cipher = None
app_name = 'Gameficacao'
win_icon = 'icon.ico'
a = Analysis(['C:/Users/Artur/PycharmProjects/gameficacao/Gameficacao.py'],
pathex=[spec_root],
datas=[('C:/Users/Artur/PycharmProjects/gameficacao/*.kv', '.'), ('C:/Users/Artur/PycharmProjects/gameficacao/img/*.png', './img'), ('C:/Users/Artur/PycharmProjects/gameficacao/som/*.mp3', './som'), ('C:/Users/Artur/PycharmProjects/gameficacao/font/*.ttf', './font')],
hiddenimports=['win32timezone', 'packaging','packaging.version','webbrowser','json','enchant'],
--
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.
The logs are stored: C:\Users\YourUserName\.kivy\logs
Look at the logs when you try to run the exe. I expect you will see some messages about files that can not been found.
From: Artur
Sent: Saturday, June 20, 2020 1:39 PM
To: Kivy users support
Which I tried to solve importing "enchant" as a hidden import.
You mentioned reading the kivy log files, how do I do that ? I'm sorry, I'm very new to this language
Anyway, Thank you.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f69a8a99-b992-44f3-baf3-c80c7de4bc95o%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/c36ef3bf-4002-4448-8f08-7753a82879fao%40googlegroups.com.
[INFO ] Audio: Providers: audio_gstplayer, audio_sdl2 (audio_ffpyplayer ignored)
[INFO ] Image: Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[CRITICAL] Camera: Unable to find any valuable Camera 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
picamera - ModuleNotFoundError: No module named 'picamera'
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\camera\camera_picamera.py", line 18, in <module>
from picamera import PiCamera
gi - ModuleNotFoundError: No module named 'gi'
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\camera\camera_gi.py", line 10, in <module>
from gi.repository import Gst
opencv - ModuleNotFoundError: No module named 'cv2'
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\camera\camera_opencv.py", line 48, in <module>
import cv2
[INFO ] Clipboard: Provider: winctypes
[INFO ] Factory: 184 symbols loaded
[INFO ] Window: Provider: sdl2
[INFO ] GL: Using the "OpenGL" graphics system
[INFO ] GL: GLEW initialization succeeded
[INFO ] GL: Backend used <glew>
[INFO ] GL: OpenGL version <b'4.6.0 - Build 26.20.100.7262'>
[INFO ] GL: OpenGL vendor <b'Intel'>
[INFO ] GL: OpenGL renderer <b'Intel(R) UHD Graphics 620'>
[INFO ] GL: OpenGL parsed version: 4, 6
[INFO ] GL: Shading version <b'4.60 - Build 26.20.100.7262'>
[INFO ] GL: Texture max size <16384>
[INFO ] GL: Texture max units <32>
[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 "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\spelling\spelling_enchant.py", line 12, in <module>
import enchant
[INFO ] Text: Provider: sdl2
[INFO ] VideoGstplayer: Using Gstreamer 1.16.2.0
[INFO ] Video: Provider: gstplayer
I usually import things like this directly into my python code. I prefer to limit the editing on my .spec file.
From: Artur
Sent: Saturday, June 20, 2020 2:26 PM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
I've found them !
--
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/41b7a3e2-4fa0-4a3d-82e1-2a3064e29aafo%40googlegroups.com.
If you are not using the kivy spelling module you can safely ignore this warning. Pyinstaller puts out lots of informational and warning messages that can safely be ignored.
Is your app running?
From: Artur
Sent: Saturday, June 20, 2020 8:18 PM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
Apparently, that problem is now gone, and I have gotten those modules. BUT, this other message I can't figure out what means... "Unable to find any valuable Spelling provider".
--
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/0f66e87a-c8d3-46d3-bc77-fa2ac81a0d33o%40googlegroups.com.
If you are not using the kivy spelling module you can safely ignore this warning. Pyinstaller puts out lots of informational and warning messages that can safely be ignored.
Is your app running?
From: Artur
Sent: Saturday, June 20, 2020 8:18 PM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
Apparently, that problem is now gone, and I have gotten those modules. BUT, this other message I can't figure out what means... "Unable to find any valuable Spelling provider".
I've searched about it online and nothing comes back, in fact, google gives me problems related to another message, "Unable to find any valuable Window provider".
Do you know anything about that ? If so, please tell me.
Again, thank you very much for the help you've been giving me.
--
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.
Are you still seeing this error:
[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 "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\core\spelling\spelling_enchant.py", line 12, in <module>
import enchant
This is not a Pyinstaller warning – this is a python/kivy error. If you are still seeing this, this is your problem.
From: Artur
Sent: Sunday, June 21, 2020 7:27 AM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
No... I don't even know why. The logs are not showing anything wrong anymore. Again, the app is made, but it doesn't open.
Em domingo, 21 de junho de 2020 01:35:18 UTC-3, Elliot Garbus escreveu:
If you are not using the kivy spelling module you can safely ignore this warning. Pyinstaller puts out lots of informational and warning messages that can safely be ignored.
Is your app running?
From: Artur
Sent: Saturday, June 20, 2020 8:18 PM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
Apparently, that problem is now gone, and I have gotten those modules. BUT, this other message I can't figure out what means... "Unable to find any valuable Spelling provider".
I've searched about it online and nothing comes back, in fact, google gives me problems related to another message, "Unable to find any valuable Window provider".
Do you know anything about that ? If so, please tell me.
Again, thank you very much for the help you've been giving me.
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/0f66e87a-c8d3-46d3-bc77-fa2ac81a0d33o%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/cb6c815c-3b70-4df6-be61-41cf644662f7o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/cb6c815c-3b70-4df6-be61-41cf644662f7o%40googlegroups.com.
What does the log say?
Do you get a blank window or no window at all?
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/9c8fd8f7-5d77-42a2-8c47-366606cd3d60o%40googlegroups.com.
[INFO ] Logger: Record log in C:\Users\Artur\.kivy\logs\kivy_20-06-21_8.txt
[INFO ] deps: Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] deps: Successfully imported "kivy_deps.angle" 0.1.10
[INFO ] deps: Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] deps: Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] Kivy: v1.11.1
[INFO ] Kivy: Installed at "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] Python: v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]
[INFO ] Python: Interpreter at "C:\Users\Artur\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] Factory: 184 symbols loaded
[WARNING] Could not find GStreamer plugins. Possible solution: set GST_PLUGIN_PATH
[INFO ] Logger: Record log in C:\Users\Artur\.kivy\logs\kivy_20-06-21_9.txt
[INFO ] deps: Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO ] deps: Successfully imported "kivy_deps.angle" 0.1.10
[INFO ] deps: Successfully imported "kivy_deps.glew" 0.2.0
[INFO ] deps: Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] Kivy: v1.11.1
[INFO ] Kivy: Installed at "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] Python: v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]
[INFO ] Python: Interpreter at "C:\Users\Artur\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] Image: Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] deps: Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] Kivy: v1.11.1
[INFO ] Kivy: Installed at "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] Python: v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)]
[INFO ] Python: Interpreter at "C:\Users\Artur\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] AudioGstplayer: Using Gstreamer 1.16.2.0
[INFO ] Audio: Providers: audio_gstplayer, audio_sdl2 (audio_ffpyplayer ignored)
[INFO ] Image: Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] Camera: Provider: opencv(['camera_picamera', 'camera_gi'] ignored)
[INFO ] Clipboard: Provider: winctypes
[INFO ] Factory: 184 symbols loaded
[INFO ] Window: Provider: sdl2
[INFO ] GL: Using the "OpenGL" graphics system
[INFO ] GL: GLEW initialization succeeded
[INFO ] GL: Backend used <glew>
[INFO ] GL: OpenGL version <b'4.6.0 - Build 26.20.100.7262'>
[INFO ] GL: OpenGL vendor <b'Intel'>
[INFO ] GL: OpenGL renderer <b'Intel(R) UHD Graphics 620'>
[INFO ] GL: OpenGL parsed version: 4, 6
[INFO ] GL: Shading version <b'4.60 - Build 26.20.100.7262'>
[INFO ] GL: Texture max size <16384>
[INFO ] GL: Texture max units <32>
[INFO ] Window: auto add sdl2 input provider
[INFO ] Window: virtual keyboard not allowed, single mode, not docked
[INFO ] Spelling: Provider: enchant
[INFO ] Text: Provider: sdl2
[INFO ] VideoGstplayer: Using Gstreamer 1.16.2.0
[INFO ] Video: Provider: gstplayer
The dependencies are not the correct version for kivy 1.11.1
Does this app run if not ‘packaged’?
Install the dependencies (skip gstreamer (~120MB) if not needed, see Kivy’s dependencies). If you are upgrading Kivy, see Updating Kivy from a previous release:
python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.* kivy_deps.glew==0.1.*
python -m pip install kivy_deps.gstreamer==0.1.*
From: Artur
Sent: Sunday, June 21, 2020 12:04 PM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
Ok, so I thought I fixed something and turns out it's still there. The gstream thing is still happening "[WARNING] Could not find GStreamer plugins. Possible solution: set GST_PLUGIN_PATH", and that's the only thing happening right now (at least the only one I can see, I will send the logs again
--
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/a6524bfb-6f8a-4dd0-9844-581d0da7304ao%40googlegroups.com.
On Jun 21, 2020, at 5:53 PM, Artur <artu...@hotmail.com> wrote:
The code itself runs just fine, and I checked and the pc told me the version of the kivy I was using was 1.11.1, but I tried the codes you sent anyway and I updated kivy, Unfortunattely, the program still doesn't run. Now, I checked the files that the pyinstaller creates and I found there a log that has a lot of information, it says basically every import that pyinstaller wasn't able to make. Now, it also says that most of them MAY not be obligatory, but there must be something there, maybe. Since it's kinda long I'm attaching it as a file.
Besides that, I'm adding some dependencies to the hidden_imports because I found a post in a forum that says this solved the problem, and I will have someone else running the program for me to see if it's a problem of my machine or something as well.Finally, I want to thank you for all the help you have been giving me, I'm very gratefull for it, thank you so much.
--
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/d889e30c-1ec2-46fb-9a88-2a1d18a64180o%40googlegroups.com.
<warn-gameficacao.txt>
When you run the program (not the frozen exe), you will see the info in the console window. What is the version of the dependencies. I’m concerned there is an install issue and you are picking up different versions for the exe and the python run.
It would look just like the log file. Something like:
C:\Users\ellio\kivy_venv\Scripts\python.exe C:/Users/ellio/PycharmProjects/KivyHelp2/aimage.py
[INFO ] [Logger ] Record log in C:\Users\ellio\.kivy\logs\kivy_20-06-21_17.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.1.17
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.22
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Users\ellio\kivy_venv\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)]
[INFO ] [Python ] Interpreter at "C:\Users\ellio\kivy_venv\Scripts\python.exe"
From: Artur
Sent: Sunday, June 21, 2020 8:03 PM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
Where do I see this information ? I can only guess wich dependencies I need when the program explicitly says he couldn't find it.
--
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/17d9d148-d5da-4f07-b1fb-e1efafa56822o%40googlegroups.com.
You are using different installation for your runs and your pyinstaller builds. Both these installations have the incorrect dependencies.
I recommend creating a new venv as described in the installation instructions. Follow the installation instructions to the letter. Do your runs and pyinstaller builds with the venv activated.
From: Artur
Sent: Thursday, June 25, 2020 9:11 AM
To: Kivy users support
Subject: Re: [kivy-users] How to package a kivy app for windows
[INFO ] deps: Successfully imported "kivy_deps.gstreamer" 0.1.18
--
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/ccc61263-5d30-4b68-95ed-d4e1e1e094bdo%40googlegroups.com.
That is interesting. I don’t use Gstreamer so I did not have that in my example. Are you using Gstreamer?
Did you have to add the reset code? Does it work without it? I have never had do to anything like that.
From: Artur
Sent: Friday, July 3, 2020 4:46 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/8904500d-6262-465e-b483-a20a166655fdo%40googlegroups.com.
Interesting – thanks for the follow up.
From: Artur
Sent: Saturday, July 4, 2020 9:52 AM
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/ea379017-d19e-49b0-8ca9-b8b781e96900o%40googlegroups.com.