transplant icon indicating copy to clipboard operation
transplant copied to clipboard

When I use “pyinstaller” to export py as exe, it shows the following

Open haaabb opened this issue 2 years ago • 4 comments

Traceback (most recent call last): File "mainwindow.py", line 40, in matlab = transplant.Matlab(jvm=False) File "transplant\transplant_master.py", line 542, in init File "transplant\transplant_master.py", line 711, in _locate_libzmq RuntimeError: could not locate libzmq for Matlab

When I run the program in pycharm, it runs normally, but after packaging it into an exe file, the exe file cannot run normally. Thank you very much!!!

haaabb avatar Jun 21 '22 08:06 haaabb

You probably need to install libzmq. How did you install it originally?

bastibe avatar Jun 21 '22 08:06 bastibe

I remember that I installed the library with anaconda. I have no problem running it on pycharm, but the above problem occurs after packaging it into an exe

haaabb avatar Jun 21 '22 15:06 haaabb

I tried to put libzmq.dll directly to the path of the exe file, the above error is gone, but a new error appears, it shows "error loading libzmq.dll", it prompts me to need a compiler, but I have installed MinGW, and added to PATH, I don't understand why it's not working

haaabb avatar Jun 22 '22 08:06 haaabb

As you can see in the code, transplant searches for libzmq in your PATH, and in C:/Program Files/ZeroMQ*/bin (which is the default directory if you install libzmq using the official installers from http://wiki.zeromq.org/intro:get-the-software).

If Matlab can't find an appropriate compiler, try installing MinGW in Matlab's own app store thing. That seems to work relatively reliably.

bastibe avatar Jun 22 '22 14:06 bastibe