Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haaabb opened this issue Jun 21, 2022 · 4 comments
Open

Comments

@haaabb
Copy link

haaabb commented Jun 21, 2022

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!!!

@bastibe
Copy link
Owner

bastibe commented Jun 21, 2022

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

@haaabb
Copy link
Author

haaabb commented Jun 21, 2022

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
Copy link
Author

haaabb commented Jun 22, 2022

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

@bastibe
Copy link
Owner

bastibe commented Jun 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants