chipmuenk/pyfda

Packaging error using pyinstaller

Closed this issue · 5 comments

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

Thanx for the feedback, I have some questions:

  • Which release / version of pyfda are you trying to package?
  • Do you really need the --onefile option? The options in the spec file should set everything that is needed.
  • Which Ubuntu version are you using?

I'll try to reproduce the error on my own Ubuntu system later on.

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.