I'm trying to install gevent in msys2 ucrt64 and I get the error below. Is there a workaround for it?
$ pip install gevent
Collecting gevent
Using cached gevent-24.10.3.tar.gz (6.1 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [82 lines of output]
Collecting setuptools>=40.8.0
Using cached setuptools-75.3.0-py3-none-any.whl.metadata (6.9 kB)
Collecting Cython>=3.0.11
Using cached Cython-3.0.11-py2.py3-none-any.whl.metadata (3.2 kB)
Collecting cffi>=1.17.1
Using cached cffi-1.17.1.tar.gz (516 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting greenlet>=3.0.3
Using cached greenlet-3.1.1-cp311-cp311-mingw_x86_64_ucrt.whl
Collecting pycparser (from cffi>=1.17.1)
Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Using cached setuptools-75.3.0-py3-none-any.whl (1.3 MB)
Using cached Cython-3.0.11-py2.py3-none-any.whl (1.2 MB)
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (pyproject.toml): started
Building wheel for cffi (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for cffi (pyproject.toml) did not run successfully.
exit code: 1
[48 lines of output]
_configtest.c:2:2: error: #error "not MSVC"
2 | #error "not MSVC"
| ^~~~~
Note: will not use '__thread' in the C code
***** The above error message can be safely ignored.
running bdist_wheel
running build
running build_py
creating build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/api.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/backend_ctypes.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/cffi_opcode.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/commontypes.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/cparser.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/error.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/ffiplatform.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/lock.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/model.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/pkgconfig.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/recompiler.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/setuptools_ext.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/vengine_cpy.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/vengine_gen.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/verifier.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/_imp_emulation.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/_shimmed_dist_utils.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/__init__.py -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/_cffi_include.h -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/parse_c_type.h -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/_embedding.h -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
copying src/cffi/_cffi_errors.h -> build/lib.mingw_x86_64_ucrt-cpython-311/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.mingw_x86_64_ucrt-cpython-311/src/c
gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1 -O3 -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1 -O3 -DFFI_BUILDING=1 -ID:/msys64/ucrt64/include/python3.11 -c src/c/_cffi_backend.c -o build/temp.mingw_x86_64_ucrt-cpython-311/src/c/_cffi_backend.o
src/c/_cffi_backend.c: In function 'b_do_dlopen':
src/c/_cffi_backend.c:4568:40: error: passing argument 1 of 'PyUnicode_AsWideChar' from incompatible pointer type [-Wincompatible-pointer-types]
4568 | sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| PyUnicodeObject *
In file included from D:/msys64/ucrt64/include/python3.11/Python.h:51,
from src/c/_cffi_backend.c:2:
D:/msys64/ucrt64/include/python3.11/unicodeobject.h:299:15: note: expected 'PyObject *' {aka 'struct _object *'} but argument is of type 'PyUnicodeObject *'
299 | PyObject *unicode, /* Unicode object */
| ~~~~~~~~~~^~~~~~~
error: command 'D:\\msys64\\ucrt64\\bin/gcc.EXE' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cffi
Failed to build cffi
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (cffi)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.