miguelgrinberg / Flask-SocketIO

Socket.IO integration for Flask applications.
MIT License
5.31k stars 888 forks source link

pyinstaller Packaging error #2042

Closed hzb888 closed 4 months ago

hzb888 commented 4 months ago

from flask import Flask from flask_cors import CORS from flask_socketio import SocketIO

app = Flask(name) CORS(app) app.config['SECRET_KEY'] = 'secret!' socketio = SocketIO(app, cors_allowed_origins='*')

@app.route("/") def hello_world(): return "

Hello, World!

"

@socketio.on('connect') def test_connect(): print("connect")

if name == 'main':

app.run()

socketio.run(app)

This is my code and then package it with pyinstaller as an exe Then run the exe to report ImportError: DLL load failed while importing _ssl

Below is the environmental information Flask = = 2.2.3 Flask - Babel = = 3.0.1 Flask - Cors = = 4.0.0 Flask - SocketIO = = 5.3.6 Flask - Sockets = = 0.2.1 Pyinstaller = = 6.3.0 Pyinstaller hooks - contrib = = 2024.0

miguelgrinberg commented 4 months ago

Please don't write issues on this package when you just need help with your own problems. PyInstaller has been discussed in several issues on this board, please search for them. Unfortunately I do not have any experience with this tool.