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

ValueError: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 152 from C header, got 40 from PyObject #2539

Closed
2 tasks done
luorq3 opened this issue Jan 10, 2024 · 2 comments
Labels

Comments

@luorq3
Copy link

luorq3 commented Jan 10, 2024

Prerequisites

Description

Dependency: gevent-23.9.1 greenlet-3.0.3. locust-2.20.1
System: macOS m1

After I installed Locust with pip3 install locust, I can't run command locust normally.Detailed ouput:

Traceback (most recent call last):
File "/Library/anaconda3/envs/delta/bin/locust", line 5, in
from locust.main import main
File "/Library/anaconda3/envs/delta/lib/python3.8/site-packages/locust/init.py", line 13, in
from gevent import monkey
File "/Library/anaconda3/envs/delta/lib/python3.8/site-packages/gevent/init.py", line 72, in
from gevent._hub_local import get_hub
File "/Library/anaconda3/envs/delta/lib/python3.8/site-packages/gevent/_hub_local.py", line 150, in
import_c_accel(globals(), 'gevent.__hub_local')
File "/Library/anaconda3/envs/delta/lib/python3.8/site-packages/gevent/_util.py", line 148, in import_c_accel
mod = importlib.import_module(cname)
File "/Library/anaconda3/envs/delta/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "src/gevent/_hub_local.py", line 1, in init gevent._gevent_c_hub_local
ValueError: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 152 from C header, got 40 from PyObject

Command line

locust -V

Locustfile contents

from locust import HttpUser, task

class HelloWorldUser(HttpUser):
    @task
    def hello_world(self):
        self.client.get("https://www.google.com/")

Python version

3.8.5

Locust version

gevent-23.9.1 greenlet-3.0.3. locust-2.20.1

Operating system

macOS m1

@luorq3 luorq3 added the bug label Jan 10, 2024
@cyberw
Copy link
Collaborator

cyberw commented Jan 10, 2024

Hi! Greenlet 3.0.3 was released just a couple weeks ago. Can you try installing greenlet 3.0.2? Or install using --no-binary gevent

Or perhaps this is an anaconda-specific problem.

@luorq3
Copy link
Author

luorq3 commented Jan 10, 2024

Hi, I have tried install greenlet 3.0.2 or reinstall gevent with --no-binary, this problem still exists.

And if I change a device, locust -V works well.

So maybe it's indeed a anaconda-specific problem.

Thank you!

@luorq3 luorq3 closed this as completed Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants