无法安装gevent

问题描述 投票:0回答:0

我为代码墙道歉,但是,我不再明白如何解决这个问题 我是新手,但我已经遵循了所有基本建议,但无济于事,也许有人可以指出我做错了什么

谢谢你的时间

venv) kit@MacBook-Air-Kirill telegaSteam % pip install gevent
Collecting gevent
  Using cached gevent-22.10.2.tar.gz (6.6 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [242 lines of output]
      Collecting setuptools>=40.8.0
        Using cached setuptools-67.6.0-py3-none-any.whl (1.1 MB)
      Collecting Cython>=3.0a11
        Using cached Cython-3.0.0b1-py2.py3-none-any.whl (1.1 MB)
      Collecting cffi>=1.12.3
        Using cached cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl (174 kB)
      Collecting greenlet>=2.0.0
        Using cached greenlet-2.0.2.tar.gz (164 kB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting pycparser
        Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
      Building wheels for collected packages: greenlet
        Building wheel for greenlet (setup.py): started
        Building wheel for greenlet (setup.py): finished with status 'error'
        error: subprocess-exited-with-error
      
        × python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [98 lines of output]
            running bdist_wheel
            running build
            running build_py
            creating build
            creating build/lib.macosx-10.9-universal2-cpython-39
            creating build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            creating build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            creating build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_version.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_weakref.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_gc.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/leakcheck.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_generator.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_greenlet_trash.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_throw.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_tracing.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_cpp.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_contextvars.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_greenlet.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_extension_interface.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_generator_nested.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_stack_saved.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_leaks.py -> build/lib.macosx-10.9-universal2-cpython-39/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'
            warning: no previously-included files found matching 'benchmarks/*.json'
            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.cpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_allocator.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_compiler_compat.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_cpython_compat.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_exceptions.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_greenlet.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_internal.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_refs.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_slp_switch.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_thread_state.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_thread_state_dict_cleanup.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_thread_support.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/slp_platformselect.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm64_masm.asm -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm64_masm.obj -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm64_msvc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_mips_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_s390_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x32_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x86_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/tests/_test_extension.c -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            running build_ext
            building 'greenlet._greenlet' extension
            creating build/temp.macosx-10.9-universal2-cpython-39
            creating build/temp.macosx-10.9-universal2-cpython-39/src
            creating build/temp.macosx-10.9-universal2-cpython-39/src/greenlet
            clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/kit/PycharmProjects/telegaSteam/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c src/greenlet/greenlet.cpp -o build/temp.macosx-10.9-universal2-cpython-39/src/greenlet/greenlet.o --std=gnu++11
            src/greenlet/greenlet.cpp:16:10: fatal error: 'Python.h' file not found
            #include <Python.h>
                     ^~~~~~~~~~
            1 error generated.
            error: command '/usr/bin/clang' 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 greenlet
        Running setup.py clean for greenlet
      Failed to build greenlet
      Installing collected packages: setuptools, pycparser, greenlet, Cython, cffi
        Running setup.py install for greenlet: started
        Running setup.py install for greenlet: finished with status 'error'
        error: subprocess-exited-with-error
      
        × Running setup.py install for greenlet did not run successfully.
        │ exit code: 1
        ╰─> [100 lines of output]
            running install
            /Users/kit/PycharmProjects/telegaSteam/venv/lib/python3.9/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-10.9-universal2-cpython-39
            creating build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            creating build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            creating build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_version.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_weakref.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_gc.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/leakcheck.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_generator.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_greenlet_trash.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_throw.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_tracing.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_cpp.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_contextvars.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_greenlet.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_extension_interface.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_generator_nested.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_stack_saved.py -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/test_leaks.py -> build/lib.macosx-10.9-universal2-cpython-39/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'
            warning: no previously-included files found matching 'benchmarks/*.json'
            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.cpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_allocator.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_compiler_compat.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_cpython_compat.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_exceptions.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_greenlet.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_internal.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_refs.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_slp_switch.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_thread_state.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_thread_state_dict_cleanup.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/greenlet_thread_support.hpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/slp_platformselect.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet
            copying src/greenlet/platform/setup_switch_x64_masm.cmd -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_aarch64_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_alpha_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_amd64_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm32_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm32_ios.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm64_masm.asm -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm64_masm.obj -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_arm64_msvc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_csky_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_m68k_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_mips_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc64_aix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc64_linux.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_aix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_linux.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_macosx.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_ppc_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_riscv_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_s390_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_sparc_sun_gcc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x32_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x64_masm.asm -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x64_masm.obj -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x64_msvc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x86_msvc.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/platform/switch_x86_unix.h -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/platform
            copying src/greenlet/tests/_test_extension.c -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            copying src/greenlet/tests/_test_extension_cpp.cpp -> build/lib.macosx-10.9-universal2-cpython-39/greenlet/tests
            running build_ext
            building 'greenlet._greenlet' extension
            creating build/temp.macosx-10.9-universal2-cpython-39
            creating build/temp.macosx-10.9-universal2-cpython-39/src
            creating build/temp.macosx-10.9-universal2-cpython-39/src/greenlet
            clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Users/kit/PycharmProjects/telegaSteam/venv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c src/greenlet/greenlet.cpp -o build/temp.macosx-10.9-universal2-cpython-39/src/greenlet/greenlet.o --std=gnu++11
            src/greenlet/greenlet.cpp:16:10: fatal error: 'Python.h' file not found
            #include <Python.h>
                     ^~~~~~~~~~
            1 error generated.
            error: command '/usr/bin/clang' failed with exit code 1
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
      
      × Encountered error while trying to install package.
      ╰─> greenlet
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [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.
(venv) kit@MacBook-Air-Kirill telegaSteam % 

尝试重新安装,通过 brew 安装,更改 python 版本

python macos pip gevent
© www.soinside.com 2019 - 2024. All rights reserved.