No Module Named When Using Pyinstaller

No module named when using PyInstaller

The problem were some runtime dependencies of matplotlib. So the compiling was fine while running the program threw some errors. Because the terminal closed itself immediately I didn't realize that. After redirecting stdout and stderr to a file I could see that I missed the libraries Tkinter and FileDialog. Adding two imports at the top of the main solved this problem.

Trouble using pyinstaller No module named '_ssl'

I finally find the solution.
For people who facing the same trouble:

Here is the command I use for create the binary file:

pyinstaller --hidden-import _ssl --hidden-import engineio.async_gevent --hidden-import engineio.async_eventlet  --hidden-import ssl ./server_websocket.py -y

I also need to modify the socketIO call:

app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app, async_mode='gevent')

And import that:

from engineio.async_drivers import gevent

How to fix a pyinstaller 'no module named...' error when my script imports the modules pikepdf and pdfminer3?

I found a solution to this error:

No module named 'pikepdf._cpphelpers'

Simply add:

from pikepdf import _cpphelpers

To the top of your script

No module named PyInstaller' after what appears to be a successful install

Although I do not fully undestand the reason behind it, it seems like the --no-cache-dir option was causing the issue. The dockerfile below builds without an issue:

FROM debian:buster

RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip

RUN python3 -m pip install PyInstaller==3.5
RUN python3 -m PyInstaller --help

Edit: This seems to be an issue outside of PyInstaller, but with the specific version of pip, see https://github.com/pyinstaller/pyinstaller/issues/6963 for details.



Related Topics



Leave a reply



Submit