I'm trying to create an executable file from my Python application with Pyinstaller, so I've created a virtual environment and I've installed all the required packages.
I have also installed snap7 wrapper with the command pip install python-snap7
.
If I run the python file from my terminal, it works fine. However, when I create the executable file with Pyinstaller and I try to run it, the following message appears and the application doesn't start:
Traceback (most recent call last):
File "myapp.py", line 772, in <module>
File "myapp.py", line 751, in main
File "snap7\client.py", line 64, in __init__
File "snap7\common.py", line 72, in load_library
File "snap7\common.py", line 63, in __init__
RuntimeError: can't find snap7 library. If installed, try running ldconfig
[22236] Failed to execute script 'myapp' due to unhandled exception!
Maybe I didn't install the complete snap7
library (as written in https://python-snap7.readthedocs.io/en/0.5/installation.html#snap7), but I don't know how to install it inside a Python virtual environment