Try adding the missing library to the hiddenimports list in the spec file; or make sure it is imported in your python code. The error suggests that for some reason, pyinstaller is not seeing matplotlib, so it is not being pulled into the bundle.
Below is my “typical” windows spec file. The Collect section has a change – so the source files are not pulled into the bundle. Also notice the datas section is used to add the data directories to the bundle.
# -*- mode: python -*-
from kivy_deps import sdl2, glew
block_cipher = None
app_name = 'App Name Here'
win_icon = '../Images/my_icon.ico'
a = Analysis(['../main.py'],
pathex=[],
binaries=[],
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/7e40dce0-70b9-42ca-9f28-1ff99217108fn%40googlegroups.com.
If you look inside the dist directory that pyinstaller created, is the ‘missing’ file in the correct place?
This video will not help with your specific issue – but it helped me understand how pyinstaller works.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1b8ce4b0-9cc1-4671-89a4-3233897abc28n%40googlegroups.com.
You could add the file, registry.txt, to the datas section. Remember to specify the full source file and the dst directory. See: https://pyinstaller.org/en/stable/spec-files.html#adding-data-files
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/611b3c02-6f31-4d2c-a078-06805f2e77fcn%40googlegroups.com.
You have a set of imports in kv. Especially at the top of spyzer.kv
Pyinstaller does not know about imports in kv.
Add the python imports that are uniquely in kv to main.py, or add them to hidden imports.
If I have time later tonight I’ll try a build.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/666f26e8-860c-4974-bfb2-a70205ad4357n%40googlegroups.com.
Did a little more work… It looks like librosa does not provide pyinstaller hooks.
It might be possible to just add some of the files to datas list in the spec file or you may need to create a hook file.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/62819b1a.1c69fb81.8f5ae.e452SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Doing a little more searching it looks like:
You should do the following:
To your spec file Add:
from PyInstaller.utils.hooks import collect_data_files
then extend the datas=[] to include
collect_data_files('librosa')
https://pyinstaller.org/en/stable/hooks.html#PyInstaller.utils.hooks.collect_data_files
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/62819e2b.1c69fb81.d617b.2dd9SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
On May 16, 2022, at 4:53 AM, Oliver ulfik <use...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/34c5d8fd-5dcc-4a19-b5f2-99171df1cd97n%40googlegroups.com.