Can't Run Gevent on Python3.7

Skip to first unread message

Aug 30, 2020, 10:18:58 AM8/30/20
to gevent: coroutine-based Python network library
I am trying to run gevent for my Python 3.7.0b3 virtual env (ubuntu-1804)

I am getting the following error
Error: class uri 'gevent' invalid or not found:

[Traceback (most recent call last):

File "/opt/superset-prod/prodsuperset/lib/python3.7/site-packages/gunicorn/", line 99, in load_class

= importlib.import_module('.'.join(components))

File "/usr/lib/python3.7/importlib/", line 127, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "<frozen importlib._bootstrap>", line 1006, in _gcd_import

File "<frozen importlib._bootstrap>", line 983, in _find_and_load

File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 677, in _load_unlocked

File "<frozen importlib._bootstrap_external>", line 726, in exec_module

File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

File "/opt/superset-prod/prodsuperset/lib/python3.7/site-packages/gunicorn/workers/", line 14, in <module>

import gevent

File "/opt/superset-prod/prodsuperset/lib/python3.7/site-packages/gevent/", line 98, in <module>

from gevent.os import fork

File "/opt/superset-prod/prodsuperset/lib/python3.7/site-packages/gevent/", line 495, in <module>

= os.posix_spawnp

AttributeError: module 'os' has no attribute 'posix_spawnp'

Any Help regarding this ?

Jason Madden

Aug 30, 2020, 10:32:28 AM8/30/20
In short, please upgrade your Python to a released version. gevent does not support Python 3.7 beta 3, but does support released versions; gevent is currently tested against 3.7.5 and 3.7.7.

`posix_spawn` and `posix_spawnp` are APIs that were added to Python 3.8. Unfortunately, in Python 3.7.0b1, a preliminary version of `posix_spawn` was added, *without* adding `posix_spawnp`. This was later removed in 3.7.0b5 because the API was considered too unfinished; gevent relies on both APIs being available if one is. Consequently, it won't run on 3.7b1 through 3.7b4 at least.


Grady Player

Aug 31, 2020, 7:42:27 AM8/31/20
It sounds like you haven’t installed gevent in your virtual env...

With that venv active run
pip install gevent


Sent from my iPhone

On Aug 30, 2020, at 8:19 AM, wrote:

You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Akash Agrawal

Nov 22, 2022, 5:42:47 AM11/22/22
to gevent: coroutine-based Python network library
If you're getting this in late 2022 or later, this might be of interest:
gevent 20.9.0 had an unbounded dependency on greenlet, and they just released a breaking change. Pinning the greenlet version seems to help here.
Reply all
Reply to author
0 new messages