Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gunicorn fails to run without futures #1200

Closed
robbles opened this issue Feb 6, 2016 · 4 comments
Closed

Gunicorn fails to run without futures #1200

robbles opened this issue Feb 6, 2016 · 4 comments

Comments

@robbles
Copy link

robbles commented Feb 6, 2016

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
    __import__(name)
  File "/src/.venv/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 37, in <module>
    """)
RuntimeError:
    You need to install the 'futures' package to use this worker with this
    Python version.

]

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?

@benoitc
Copy link
Owner

benoitc commented Feb 6, 2016

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 👍

@robbles
Copy link
Author

robbles commented Feb 6, 2016

@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 😄

@mouarfff
Copy link

mouarfff commented Oct 4, 2018

Hello, maybe i'm stupid but i don't know how to solve this problem...

I tried to type "pip install futures" but it's not work, there is the same message

I'm on debian 9.5 with 4.9.0-8-amd64 kernel

@aycatakmaz
Copy link

Deleting gunicorn from everywehere and installing gunicorn3 worked for me:

sudo apt-get remove gunicorn
pip uninstall gunicorn
pip3 uninstall gunicorn
sudo apt-get install gunicorn3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants