AlmaLinux release 9.4 (Seafoam Ocelot)安装包 build失败

pip 安装失败

显示 build 失败

Building wheels for collected packages: cymem, murmurhash
  Building wheel for cymem (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for cymem (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-38/cymem
      copying cymem/__init__.py -> build/lib.linux-x86_64-cpython-38/cymem
      copying cymem/about.py -> build/lib.linux-x86_64-cpython-38/cymem
      creating build/lib.linux-x86_64-cpython-38/cymem/tests
      copying cymem/tests/__init__.py -> build/lib.linux-x86_64-cpython-38/cymem/tests
      copying cymem/tests/test_import.py -> build/lib.linux-x86_64-cpython-38/cymem/tests
      copying cymem/cymem.pyx -> build/lib.linux-x86_64-cpython-38/cymem
      copying cymem/__init__.pxd -> build/lib.linux-x86_64-cpython-38/cymem
      copying cymem/cymem.pxd -> build/lib.linux-x86_64-cpython-38/cymem
      running build_ext
      building 'cymem.cymem' extension
      creating build/temp.linux-x86_64-cpython-38/cymem
      g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python3/include/python3.8 -I/home/venvs/alita/include -I/usr/local/python3/include/python3.8 -c cymem/cymem.cpp -o build/temp.linux-x86_64-cpython-38/cymem/cymem.o -O3 -Wno-strict-prototypes -Wno-unused-function
      /tmp/pip-build-env-i5yohk0c/overlay/lib/python3.8/site-packages/setuptools/dist.py:495: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
      
              ********************************************************************************
              Usage of dash-separated 'index-url' will not be supported in future
              versions. Please use the underscore name 'index_url' instead.
      
              By 2025-Mar-03, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        opt = self.warn_dash_deprecation(opt, section)
      error: command 'g++' failed: Not a directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cymem
  Building wheel for murmurhash (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for murmurhash (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [36 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-38/murmurhash
      copying murmurhash/__init__.py -> build/lib.linux-x86_64-cpython-38/murmurhash
      copying murmurhash/about.py -> build/lib.linux-x86_64-cpython-38/murmurhash
      creating build/lib.linux-x86_64-cpython-38/murmurhash/tests
      copying murmurhash/tests/__init__.py -> build/lib.linux-x86_64-cpython-38/murmurhash/tests
      copying murmurhash/tests/test_hash.py -> build/lib.linux-x86_64-cpython-38/murmurhash/tests
      copying murmurhash/tests/test_import.py -> build/lib.linux-x86_64-cpython-38/murmurhash/tests
      copying murmurhash/mrmr.pyx -> build/lib.linux-x86_64-cpython-38/murmurhash
      copying murmurhash/__init__.pxd -> build/lib.linux-x86_64-cpython-38/murmurhash
      copying murmurhash/mrmr.pxd -> build/lib.linux-x86_64-cpython-38/murmurhash
      creating build/lib.linux-x86_64-cpython-38/murmurhash/include/murmurhash
      copying murmurhash/include/murmurhash/MurmurHash2.h -> build/lib.linux-x86_64-cpython-38/murmurhash/include/murmurhash
      copying murmurhash/include/murmurhash/MurmurHash3.h -> build/lib.linux-x86_64-cpython-38/murmurhash/include/murmurhash
      running build_ext
      building 'murmurhash.mrmr' extension
      creating build/temp.linux-x86_64-cpython-38/murmurhash
      g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python3/include/python3.8 -I/tmp/pip-install-4f621kqk/murmurhash_b1fa542d185146bc928670f8fe3ccb92/murmurhash/include -I/home/venvs/alita/include -I/usr/local/python3/include/python3.8 -c murmurhash/MurmurHash2.cpp -o build/temp.linux-x86_64-cpython-38/murmurhash/MurmurHash2.o -O3 -Wno-strict-prototypes -Wno-unused-function
      /tmp/pip-build-env-wiwrjfhc/overlay/lib/python3.8/site-packages/setuptools/dist.py:495: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
      
              ********************************************************************************
              Usage of dash-separated 'index-url' will not be supported in future
              versions. Please use the underscore name 'index_url' instead.
      
              By 2025-Mar-03, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        opt = self.warn_dash_deprecation(opt, section)
      error: command 'g++' failed: Not a directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for murmurhash
Failed to build cymem murmurhash
ERROR: Could not build wheels for cymem, murmurhash, which is required to install pyproject.toml-based projects

解决方案

yum install gcc-c++

执行后,解决问题。实际上是C++编译的问题,在linux中,gcc/g++/c++都是响应工具,细节上支持不同的细节规范,murmurhash3用到了必须要用c++编译的部分,所以我遇到了问题

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值