Skip to content Skip to sidebar Skip to footer

Getting Module Import Error While Running Pyinstaller Generated Binary

I'm getting an error while trying to a simple hello.py using PyInstaller on RHEL X64. Python 2.7.12 is alt installed in /opt/python Compilation Output: [root@myrig CommandManager]#

Solution 1:

PyInstaller needs python to be compiled with --enable-shared and LDFLAGS=-Wl,-rpath=<path to python lib>.

In my case:

./configure --enable-shared --prefix=/opt/python LDFLAGS=-Wl,-rpath=/opt/python/lib

Additional reference: https://bugs.python.org/issue27685

Post a Comment for "Getting Module Import Error While Running Pyinstaller Generated Binary"