Closed HungYu-Lin closed 3 years ago
Thanx for the feedback, I have some questions:
--onefile
option? The options in the spec file should set everything that is needed.I'll try to reproduce the error on my own Ubuntu system later on.
I tried to package the most update version in the branch of custom_filter_widget (commit# starting b2c2006). My OS version is Ubuntu 20.04.1 LTS I tried to remove --onefile option as well. The result seems not change. The next step I did is to add "module_version.md" into folder of "dist" after pyinstaller finish packaging. Current problem was solved by manually copy the file to "dist" folder. However, the run-time error appears when run the generated excusable file. It looks like pyinstaller packaging handles all config sections well except for the input_widgets. Here is the log output.
Created logging directory /tmp/.pyfda KeyError: 'V_NMG' [ INFO] [pyfda.pyfda_rc:186] Using 'DejaVu Sans' font. [ INFO] [pyfda.libs.tree_builder:247] Parsing config file '/home/test/.pyfda/pyfda.conf' with sections: [Common] [Input Widgets] [Plot Widgets] [Filter Widgets] [Fixpoint Widgets]
[ INFO] [pyfda.libs.tree_builder:298] Found 3 entries in [Common] [ INFO] [pyfda.libs.tree_builder:323] No valid user directory specified. [WARNING] [pyfda.libs.tree_builder:515] Module "input_specs" could not be imported. [WARNING] [pyfda.libs.tree_builder:515] Module "input_coeffs" could not be imported. [WARNING] [pyfda.libs.tree_builder:515] Module "input_pz" could not be imported. [WARNING] [pyfda.libs.tree_builder:515] Module "input_info" could not be imported. [WARNING] [pyfda.libs.tree_builder:515] Module "input_fixpoint_specs" could not be imported. [WARNING] [pyfda.libs.tree_builder:566] No class could be imported. [ INFO] [pyfda.libs.tree_builder:568] Found 6 classes in [Plot Widgets]: pyfda.plot_widgets.plot_hf.Plot_Hf pyfda.plot_widgets.plot_phi.Plot_Phi pyfda.plot_widgets.plot_tau_g.Plot_tau_g pyfda.plot_widgets.plot_pz.Plot_PZ pyfda.plot_widgets.plot_impz.Plot_Impz pyfda.plot_widgets.plot_3d.Plot_3D
[ INFO] [pyfda.libs.tree_builder:568] Found 11 classes in [Filter Widgets]: pyfda.filter_widgets.bessel.Bessel pyfda.filter_widgets.butter.Butter pyfda.filter_widgets.cheby1.Cheby1 pyfda.filter_widgets.cheby2.Cheby2 pyfda.filter_widgets.ellip.Ellip pyfda.filter_widgets.equiripple.Equiripple pyfda.filter_widgets.firwin.Firwin pyfda.filter_widgets.ma.MA pyfda.filter_widgets.my_filter_widget.AllpPZ pyfda.filter_widgets.manual.Manual_FIR pyfda.filter_widgets.manual.Manual_IIR
[ INFO] [pyfda.libs.tree_builder:568] Found 1 classes in [Fixpoint Widgets]: pyfda.fixpoint_widgets.fir_df.FIR_DF_wdg
[CRITICAL] [pyfda.input_widgets.input_tab_widgets:99] No input widgets found!
On Monday, December 7, 2020, 2:07:38 AM PST, Christian Münker <notifications@github.com> wrote:
Thanx for the feedback, I have some questions:
I'll try to reproduce the error on my own Ubuntu system later on.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm really sorry, but right now I don't even manage to create an executable under Ubuntu. I've had LOTS of problems with pyinstaller in conjunction with with Python 3.8 and matplotlib 3.3. I guess I stay with Py 3.7 and matplotlib 3.2 - that worked quite well for me. Currently, this combination fails for me as well due to some missing mkl so. I have to setup a clean system without conda and mkl, but for the moment I give up - sorry.
I've managed to create a binary under Ubuntu 20.10 (matplotlib 3.2.2, Python 3.8, pyinstaller 3.6, nomkl) which I've released at Github. Please try whether that works for you, I've no idea how OS specific pyinstaller binaries are.
I'm sorry, I can't reproduce that - closing.
I use the following commend to freeze pyfda to standalone executable in Ubuntu.
(pyfda) :~/PycharmProjects/pyfda-dev/pyfda$ pyinstaller pyfdax.py --onefile
Packaging process was completed successful, however, here is the error message when I tried to run the executable file.
(pyfda) :~/PycharmProjects/pyfda-dev/pyfda/dist$ ./pyfdax Traceback (most recent call last): File "pyfdax.py", line 32, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/home/anaconda3/envs/pyfda/lib/python3.8/site-packages/PyInstaller/loader/pyimod03_importers.py", line 493, in exec_module
exec(bytecode, module.dict)
File "libs/pyfda_lib.py", line 208, in
File "libs/pyfda_lib.py", line 191, in mod_version
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEI87K9iX/pyfda/module_versions.md'
[2973] Failed to execute script pyfdax
Version information pyinstaller: v4.1 python: v3.8