title: How to pack python flask_socketio app with pyinstaller
body: <p>I tried official demo code:</p>
  
  <pre><code>#test.py
  from flask import Flask, render_template
  from flask_socketio import SocketIO
  
  app = Flask(__name__)
  app.config['SECRET_KEY'] = 'secret!'
  socketio = SocketIO(app)
  
  if __name__ == '__main__':
      socketio.run(app)
  </code></pre>
  
  <p>it runs well, but when packed with: </p>
  
  <pre><code>pyinstaller --onefile test.py
  </code></pre>
  
  <p>and then run test.exe, I got:</p>
  
  <pre><code>Z:\test\dist&gt;test2.exe
  Traceback (most recent call last):
    File "&lt;string&gt;", line 6, in &lt;module&gt;
    File "site-packages\flask_socketio\__init__.py", line 119, in __init__
    File "site-packages\flask_socketio\__init__.py", line 144, in init_app
    File "site-packages\socketio\server.py", line 72, in __init__
    File "site-packages\engineio\server.py", line 100, in __init__
  ValueError: Invalid async_mode specified
  test2 returned -1
  </code></pre>
  
  <p>is there anything I am missing?</p>