dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 319 forks source link

can't install properly with Python3 #33

Closed alexorex closed 8 years ago

alexorex commented 8 years ago

Having installed with pip3 using either of "setup.py" and "git+https" methods, can't execute example server. First error is "cannot import name 'WebSocket'". If import from the SimpleWebSocketServer dir directly, works fine. Pip for py2 works normally.

DennisSchulmeister commented 8 years ago

I had the same issue. Python3 is more strict about relative imports. __init__.py should be changed to

from .SimpleWebSocketServer import *

(Notice the dot)

dpallot commented 8 years ago

Thanks for resolving the issue.