Huy*_*yen 8 python requirements.txt python-wheel
我在为我的项目安装依赖项时遇到错误!
\n操作系统:Windows 11
\nPython:3.10.4(64位)
\n点:22.1.2
\n Building wheel for django-admin-sortable2 (setup.py) ... done\n Created wheel for django-admin-sortable2: filename=django_admin_sortable2-0.7.5-py3-none-any.whl size=69989 sha256=0a4ff29d0c9b0422611dde61c6c1665dd36b10f98413f4ed7b8532e29afdc03d\n Stored in directory: c:\\users\\kev\\appdata\\local\\pip\\cache\\wheels\\99\\3e\\95\\384eeaa2d641ef0c9e8b46e701737b53ae6a973358887816e0\n Building wheel for easy-thumbnails (setup.py) ... done\n Created wheel for easy-thumbnails: filename=easy_thumbnails-2.7-py2.py3-none-any.whl size=69700 sha256=ce66afcd2ca403acf9225b53eed60300c8d37c3bad53dcdf37ebc3a25550bdc6\n Stored in directory: c:\\users\\kev\\appdata\\local\\pip\\cache\\wheels\\cb\\33\\00\\f7fa4b381ae4cbaf99674fb7a4411339d38e616cfcc41632c5\n Building wheel for gevent (pyproject.toml) ... error\n error: subprocess-exited-with-error\n\n \xc3\x97 Building wheel for gevent (pyproject.toml) did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [288 lines of output]\n running bdist_wheel\n running build\n running build_py\n creating build\n creating build\\lib.win-amd64-cpython-310\n creating build\\lib.win-amd64-cpython-310\\gevent\n copying src\\gevent\\ares.py -> build\\lib.win-amd64-cpython-310\\gevent\n copying src\\gevent\\backdoor.py -> build\\lib.win-amd64-cpython-310\\gevent\n copying src\\gevent\\baseserver.py -> build\\lib.win-amd64-cpython-310\\gevent\n copying src\\gevent\\builtins.py -> build\\lib.win-amd64-cpython-310\\gevent\nRun Code Online (Sandbox Code Playgroud)\n
tl;dr:使用python3.8或更新requirement.txt版本。
更多信息:
(A) gevent==20.9、(B) windows 10 和 (C) python3.10 的组合没有预先构建的轮子。您可以通过访问 pypi 并查看提供的下载内容来检查此类内容(https://pypi.org/project/gevent/20.9.0/#files)
我假设您无法自己从源代码编译东西(这很麻烦),所以您需要更改(A)、(B)或(C)。
(A)。改变这一点意味着放宽或更新版本要求。例如 gevent==21.12 确实有一个适用于 windows 和 python3.10 的轮子
(二)。改变这个意味着不使用Windows,可能不是一个选择
(C)。改变这个意味着使用旧的 python 版本。例如python3.8有一个gevent==20.9的轮子。