Flask-SocketIO: error when run exemple v1.0

this is my virtualenv:

(socket-exemple)[hugo:Flask-SocketIO](v1.0)$ pip freeze
Flask==0.10.1
Flask-SocketIO==1.0b4
gevent==1.0.2
gevent-websocket==0.9.5
greenlet==0.4.9
itsdangerous==0.24
Jinja2==2.8
MarkupSafe==0.23
python-engineio==0.7.1
python-socketio==0.6.0
six==1.10.0
Werkzeug==0.10.4

I’m trying to run the example but get the error below:

(socket-exemple)[hugo:Flask-SocketIO](v1.0)$ python example/app.py
async_mode is gevent
Traceback (most recent call last):
  File "example/app.py", line 39, in <module>
    from flask_socketio import SocketIO, emit, join_room, leave_room, \
  File "/Users/hugo/envs/socket-exemple/lib/python2.7/site-packages/flask_socketio/__init__.py", line 3, in <module>
    import socketio
ImportError: No module named socketio

What am I doing wrong ?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 31 (12 by maintainers)

Most upvoted comments

Uninstalling and reinstalling python-socketio worked for me. Seems to be a linking issue. pip uninstall python-socketio pip install python-socketio

Hi, have got the same problem: ModuleNotFoundError: No module named 'flask_socketio' Here is a part of my freeze:

Flask==1.0.4
gevent==1.4.0
python-socketio==4.3.0
flask-socketio==4.2.0

Having this error on both Py3.6 & Py3.7 export FLASK_APP won’t help.

Update gunicorn was the issue, sorry.