[SOLVED] How to install greenlet (for gevent-websocket) ?
I saw this post http://omz-software.com/pythonista/docs/ios/bottle/async.html and I would like to try websocket communications between my iOS device and my desktop.
Using Stash and pip, I managed to install gevent. The gevent-websocket installation complained about greenlet installation. I tried to install it using pip install greenlet but I got a message "Error: Cannot locate packages. Manual installation required.".
How this can be done ?
Thanks for your help...
ywangd last edited by
It cannot be done.
greenletdoes not work in Pythonista.
greenletis a pure C extension. It does not have any Python modules to be installed. That is what caused the error. C extension installation generally requires compiling C code which is impossible in Pythonista.
ccc last edited by ccc
Asyncio is built into Python 3.5 so, in theory, you could add https://github.com/Lupino/aiobottle to Pythonista 3. It is pure Python and requires https://github.com/KeepSafe/aiohttp which is also pure Python. aiohttp alone would be enough to give you Web Sockets but aiobottle would be required to get async bottle. Please let us know if you make progress on this.
Brun0oO last edited by
Thanks a lot! I´ll give it a try...
I managed to install aiobottle which requires aiohttp, multidict and chardet (I used pip install <package> under stash to install all these packages).
And this simple server (running on my ios device) seems to work from my desktop web browser:
from aiobottle import AsyncBottle import aiohttp app = AsyncBottle() @app.get('/') def root(): return 'hello word!' def main(host='0.0.0.0', port=8080): from bottle import run run(app, host = host, port = port, server = 'aiobottle:AsyncServer') if __name__ == '__main__': main()
Now, I'm trying to understand how websockets should work with aiobottle.
Thanks again for your help!
ccc last edited by
@ccc not really ;o)
I prefer to open a new topic :