Installing gunicorn 19.4.5 on OSX in a python 2.7 virtualenv yields the following error when I try to run it:
Error: class uri 'gunicorn.workers.gthread.ThreadWorker' invalid or not found:
[Traceback (most recent call last):
File "/src/.venv/lib/python2.7/site-packages/gunicorn/util.py", line 142, in load_class
mod = import_module('.'.join(components))
File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
File "/src/.venv/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 37, in <module>
You need to install the 'futures' package to use this worker with this
Installing futures with pip install futures seems to fix the problem. There's no explanation of this in the README though, it just says pip install gunicorn is enough. Did I miss a step, or is there a missing dependency that's not being pulled in on install?
pip install futures
pip install gunicorn
Using python 3 skips the need to install the futures packages :)
In the mean time we should probably add a note to the doc too, you're right. I will patch it ASAP or if you want don't hesitate to send a patch. Thanks anyway 👍
@benoitc thanks for the quick response!
I think adding a note to the docs is enough. I'd send a PR, but it'll probably be more work for you than just changing it when you have time.
I suppose requiring one extra step to continue using python2.X is good motivation for people like me to get on with upgrading to 3.x 😄
add a note about the requirements of the threads workers under python…