【TTS安装报错】Could not build wheels for TTS,Failed building wheel for psutil python-crfsuite

报错内容:

# pip install psutil
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting psutil
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/90/c7/6dc0a455d111f68ee43f27793971cf03fe29b6ef972042549db29eec39a2/psutil-5.9.8.tar.gz (503 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psutil
  Building wheel for psutil (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for psutil (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-aarch64-cpython-39
      creating build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_pswindows.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_pssunos.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psposix.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psosx.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_pslinux.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psbsd.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_psaix.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_compat.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/_common.py -> build/lib.linux-aarch64-cpython-39/psutil
      copying psutil/__init__.py -> build/lib.linux-aarch64-cpython-39/psutil
      creating build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_windows.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_unicode.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_testutils.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_system.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_sunos.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_process_all.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_process.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_posix.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_osx.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_misc.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_memleaks.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_linux.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_contracts.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_connections.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_bsd.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/test_aix.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/runner.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/__main__.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      copying psutil/tests/__init__.py -> build/lib.linux-aarch64-cpython-39/psutil/tests
      running build_ext
      building 'psutil._psutil_linux' extension
      creating build/temp.linux-aarch64-cpython-39
      creating build/temp.linux-aarch64-cpython-39/psutil
      creating build/temp.linux-aarch64-cpython-39/psutil/arch
      creating build/temp.linux-aarch64-cpython-39/psutil/arch/linux
      gcc -pthread -B /root/anaconda3/envs/sakura/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /root/anaconda3/envs/sakura/include -I/root/anaconda3/envs/sakura/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /root/anaconda3/envs/sakura/include -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=598 -DPy_LIMITED_API=0x03060000 -DPSUTIL_LINUX=1 -I/root/anaconda3/envs/sakura/include/python3.9 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-39/psutil/_psutil_common.o
      gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
      gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
      gcc: error: unrecognized command-line option ‘-n1’; did you mean ‘-n’?
      gcc: error: unrecognized command-line option ‘-n1’; did you mean ‘-n’?
      psutil could not be installed from sources. Perhaps Python header files are not installed. Try running:
        sudo yum install gcc python3-devel
      error: command '/usr/bin/gcc' 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 psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects

解决方案:

尝试过:

sudo apt install gcc make libc6-dev
sudo apt install python-dev python-pip

sudo yum install gcc make glibc-devel
sudo yum install python3-devel python3-pip

都没什么效果

直接暴力安装

sudo pip install psutil -i https://pypi.tuna.tsinghua.edu.cn/simple  --force

我是在安装TTS时出现的这些报错
其中python-crfsuite使用暴力安装也装不上
最后用conda装上了

conda install -c conda-forge python-crfsuite

在安装TTS时记得要加--force

pip install TTS --force
  • 5
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用:ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based project 。 引用:which is required to install pyproject.toml-based projects。 引用:我下载paddlex时候出现的问题 利用国内镜像资源下载比较快 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple paddlex 你以为这么简单吗? ————No 问题:请告诉我,Failed to build pytorch ERROR: Could not build wheels for pytorch, which is required to install pyproject.toml-based projects。 对于Failed to build pytorch ERROR: Could not build wheels for pytorch这个问题,可能是由于缺少某些依赖或者编译环境的问题导致的。你可以尝试以下解决方法: 1. 确保你的操作系统和Python环境是最新版本的,并且已经安装了必要的编译工具。 2. 检查你的系统是否安装了C++编译器和相关的依赖库,例如gcc、g++等。如果没有安装,可以使用系统的包管理器进行安装。 3. 确保你的系统已经安装了CMake,并且版本符合pytorch的要求。你可以在官方网站上查找pytorch所需的CMake版本。 4. 尝试使用虚拟环境安装pytorch,以隔离其他可能干扰的依赖库。 5. 如果以上方法都没有解决问题,你可以尝试在pytorch的官方GitHub页面上寻找类似的问题,并查看是否有解决方案。 希望以上方法能够帮助你解决问题。如果问题仍然存在,请提供更多详细的错误信息,以便我们能够更好地帮助你解决问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值