简体   繁体   中英

Building wheel for gevent (pyproject.toml) did not run successfully

I got an error when install dependencies for my project!

OS : WinDow 11

Python: 3.10.4 (64bit)

Pip: 22.1.2

  Building wheel for django-admin-sortable2 (setup.py) ... done
  Created wheel for django-admin-sortable2: filename=django_admin_sortable2-0.7.5-py3-none-any.whl size=69989 sha256=0a4ff29d0c9b0422611dde61c6c1665dd36b10f98413f4ed7b8532e29afdc03d
  Stored in directory: c:\users\kev\appdata\local\pip\cache\wheels\99\3e\95\384eeaa2d641ef0c9e8b46e701737b53ae6a973358887816e0
  Building wheel for easy-thumbnails (setup.py) ... done
  Created wheel for easy-thumbnails: filename=easy_thumbnails-2.7-py2.py3-none-any.whl size=69700 sha256=ce66afcd2ca403acf9225b53eed60300c8d37c3bad53dcdf37ebc3a25550bdc6
  Stored in directory: c:\users\kev\appdata\local\pip\cache\wheels\cb\33\00\f7fa4b381ae4cbaf99674fb7a4411339d38e616cfcc41632c5
  Building wheel for gevent (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for gevent (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [288 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\gevent
      copying src\gevent\ares.py -> build\lib.win-amd64-cpython-310\gevent
      copying src\gevent\backdoor.py -> build\lib.win-amd64-cpython-310\gevent
      copying src\gevent\baseserver.py -> build\lib.win-amd64-cpython-310\gevent
      copying src\gevent\builtins.py -> build\lib.win-amd64-cpython-310\gevent

tl;dr : use python3.8 or update requirement.txt versions.

More info :

The combination of (A) gevent==20.9, (B) windows 10, and (C) python3.10 does not have a prebuilt wheel. You can check this kind of stuff by going to pypi and looking what is offered for downloads ( https://pypi.org/project/gevent/20.9.0/#files )

I'm assuming that you will not be able to compile things from source yourself (it's a hassle), so you need to change (A), (B) or (C).

(A). Changing this means relaxing or updating the version requirements. For example gevent==21.12 does have a wheel for windows and python3.10

(B). Changing this means not using windows, probably not an option

(C). Changing this means using older python version. For example, python3.8 has a wheel for gevent==20.9.

gevent==20.9.0 probably doesn't support Python 3.10, you can downgrade to Python 3.8 or you can try to download and install the latest version of gevent - gevent 21.12.0 - see https://pypi.org/project/gevent/#downloads .

  1. Go to requirements.txt and replace the line gevent==20.9.0 with gevent==21.12.0 .
  2. After that you can try to install all dependencies: pip install -r requirements.txt

If the solution above doesn't help, try to manually install a gevent wheel:

  1. Download greenlet wheel greenlet‑1.1.2‑cp310‑cp310‑win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet
  2. Go to the local directory which contains downloaded greenlet wheel and install it
pip install greenlet‑1.1.2‑cp310‑cp310‑win_amd64.whl
  1. Download gevent wheel gevent‑21.12.0‑cp310‑cp310‑win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent
  2. Go to the local directory which contains downloaded gevent wheel and install it
pip install gevent‑21.12.0‑cp310‑cp310‑win_amd64.whl
  1. Finally you can remove gevent==20.9.0 from requirements.txt and install other dependencies: pip install -r requirements.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM