Reputation: 413
I came across the following error, while trying to start a Flask-GEvent app.
My OS - W7 64 bit
C:\Users\raghul\workspace\test>python run.py
Traceback (most recent call last):
File "run.py", line 1, in <module>
from views import app
File "C:\Users\raghul\workspace\test\views.py", line 4, in <module>
from socketio import socketio_manage
File "C:\Python27\lib\site-packages\socketio\__init__.py", line 4, in <module>
from socketio.server import SocketIOServer
File "C:\Python27\lib\site-packages\socketio\server.py", line 4, in <module>
import gevent
File "C:\Python27\lib\site-packages\gevent\__init__.py", line 40, in <module>
from gevent import core
ImportError: DLL load failed: %1 is not a valid Win32 application.
Any Help is highly appreciated.
Upvotes: 3
Views: 1025
Reputation: 67489
This is probably a 32-bit/64-bit mismatch between the Python binary and the gevent DLL.
My guess is that your Python is 64-bit and you installed the 32-bit Gevent. If this is the case, then uninstall gevent and then download the 64-bit version here. Alternatively you can install Python 32-bit and then install the official Gevent installer on it.
Upvotes: 1