Poetry install crashes when using python3.10 because of incompatible package greenlet
https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst
yunus@MacBook-Pro-van-Yunus viaduct % poetry install
Installing dependencies from lock file
Package operations: 108 installs, 0 updates, 0 removals
• Installing greenlet (1.0.0): Failed
EnvCommandError
Command ['/Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/bin/pip', 'install', '--no-deps', 'file:///Users/yunus/Library/Caches/pypoetry/artifacts/db/96/c5/3a5f05d328354245f21943e767ff0dc83a7a0e046b4bd2ea820be3bac5/greenlet-1.0.0.tar.gz'] errored with the following return code 1, and output:
Processing /Users/yunus/Library/Caches/pypoetry/artifacts/db/96/c5/3a5f05d328354245f21943e767ff0dc83a7a0e046b4bd2ea820be3bac5/greenlet-1.0.0.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: greenlet
Building wheel for greenlet (setup.py): started
Building wheel for greenlet (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/setup.py'"'"'; __file__='"'"'/private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-wheel-58pscc8x
cwd: /private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/
Complete output (92 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-12-arm64-3.10
creating build/lib.macosx-12-arm64-3.10/greenlet
copying src/greenlet/__init__.py -> build/lib.macosx-12-arm64-3.10/greenlet
creating build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_version.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_weakref.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_gc.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_generator.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_throw.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_tracing.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_cpp.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_contextvars.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_greenlet.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_extension_interface.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/__init__.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_generator_nested.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_stack_saved.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_leaks.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
running egg_info
writing src/greenlet.egg-info/PKG-INFO
writing dependency_links to src/greenlet.egg-info/dependency_links.txt
writing requirements to src/greenlet.egg-info/requires.txt
writing top-level names to src/greenlet.egg-info/top_level.txt
reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
copying src/greenlet/greenlet.c -> build/lib.macosx-12-arm64-3.10/greenlet
copying src/greenlet/greenlet.h -> build/lib.macosx-12-arm64-3.10/greenlet
copying src/greenlet/slp_platformselect.h -> build/lib.macosx-12-arm64-3.10/greenlet
creating build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_mips_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_s390_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x32_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x86_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/tests/_test_extension.c -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.macosx-12-arm64-3.10/greenlet/tests
running build_ext
building 'greenlet._greenlet' extension
creating build/temp.macosx-12-arm64-3.10
creating build/temp.macosx-12-arm64-3.10/src
creating build/temp.macosx-12-arm64-3.10/src/greenlet
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/include -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/greenlet/greenlet.c -o build/temp.macosx-12-arm64-3.10/src/greenlet/greenlet.o
In file included from src/greenlet/greenlet.c:348:
In file included from src/greenlet/slp_platformselect.h:49:
src/greenlet/platform/switch_aarch64_gcc.h:62:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__asm__ volatile ("mov %0, #0" : "=r" (err));
^
src/greenlet/platform/switch_aarch64_gcc.h:62:35: note: use constraint modifier "w"
__asm__ volatile ("mov %0, #0" : "=r" (err));
^~
%w0
src/greenlet/greenlet.c:570:13: error: no member named 'use_tracing' in 'struct _ts'
tstate->use_tracing = 0;
~~~~~~ ^
src/greenlet/greenlet.c:573:13: error: no member named 'use_tracing' in 'struct _ts'
tstate->use_tracing =
~~~~~~ ^
1 warning and 2 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for greenlet
Running setup.py clean for greenlet
Failed to build greenlet
Installing collected packages: greenlet
Running setup.py install for greenlet: started
Running setup.py install for greenlet: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/setup.py'"'"'; __file__='"'"'/private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-record-apimxerz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/include/site/python3.10/greenlet
cwd: /private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/
Complete output (94 lines):
running install
/Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-12-arm64-3.10
creating build/lib.macosx-12-arm64-3.10/greenlet
copying src/greenlet/__init__.py -> build/lib.macosx-12-arm64-3.10/greenlet
creating build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_version.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_weakref.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_gc.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_generator.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_throw.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_tracing.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_cpp.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_contextvars.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_greenlet.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_extension_interface.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/__init__.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_generator_nested.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_stack_saved.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/test_leaks.py -> build/lib.macosx-12-arm64-3.10/greenlet/tests
running egg_info
writing src/greenlet.egg-info/PKG-INFO
writing dependency_links to src/greenlet.egg-info/dependency_links.txt
writing requirements to src/greenlet.egg-info/requires.txt
writing top-level names to src/greenlet.egg-info/top_level.txt
reading manifest file 'src/greenlet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no files found matching '*.py' under directory 'appveyor'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '.coverage' found anywhere in distribution
adding license file 'LICENSE'
adding license file 'LICENSE.PSF'
adding license file 'AUTHORS'
writing manifest file 'src/greenlet.egg-info/SOURCES.txt'
copying src/greenlet/greenlet.c -> build/lib.macosx-12-arm64-3.10/greenlet
copying src/greenlet/greenlet.h -> build/lib.macosx-12-arm64-3.10/greenlet
copying src/greenlet/slp_platformselect.h -> build/lib.macosx-12-arm64-3.10/greenlet
creating build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_mips_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_s390_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x32_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/platform/switch_x86_unix.h -> build/lib.macosx-12-arm64-3.10/greenlet/platform
copying src/greenlet/tests/_test_extension.c -> build/lib.macosx-12-arm64-3.10/greenlet/tests
copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.macosx-12-arm64-3.10/greenlet/tests
running build_ext
building 'greenlet._greenlet' extension
creating build/temp.macosx-12-arm64-3.10
creating build/temp.macosx-12-arm64-3.10/src
creating build/temp.macosx-12-arm64-3.10/src/greenlet
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/opt/homebrew/include -I/opt/homebrew/opt/openssl@1.1/include -I/opt/homebrew/opt/sqlite/include -I/Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/include -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c src/greenlet/greenlet.c -o build/temp.macosx-12-arm64-3.10/src/greenlet/greenlet.o
In file included from src/greenlet/greenlet.c:348:
In file included from src/greenlet/slp_platformselect.h:49:
src/greenlet/platform/switch_aarch64_gcc.h:62:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__asm__ volatile ("mov %0, #0" : "=r" (err));
^
src/greenlet/platform/switch_aarch64_gcc.h:62:35: note: use constraint modifier "w"
__asm__ volatile ("mov %0, #0" : "=r" (err));
^~
%w0
src/greenlet/greenlet.c:570:13: error: no member named 'use_tracing' in 'struct _ts'
tstate->use_tracing = 0;
~~~~~~ ^
src/greenlet/greenlet.c:573:13: error: no member named 'use_tracing' in 'struct _ts'
tstate->use_tracing =
~~~~~~ ^
1 warning and 2 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/setup.py'"'"'; __file__='"'"'/private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-req-build-ecs43bsc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2q/5wvz22t11tq6b5cyfsw5q97r0000gn/T/pip-record-apimxerz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yunus/Library/Caches/pypoetry/virtualenvs/viaduct-pqh8VKXx-py3.10/include/site/python3.10/greenlet Check the logs for full command output.
at /opt/homebrew/Cellar/poetry/1.1.12/libexec/lib/python3.10/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
Edited by Yunus Demir