安装psutil模块报错

朴灿烈づ我的快乐病毒、 2022-02-25 00:08 702阅读 0赞

报错

  1. pip3.6 install psutil
  2. ......
  3. psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
  4. #include <Python.h>
  5. ^
  6. compilation terminated.
  7. error: command 'gcc' failed with exit status 1
  8. ----------------------------------------
  9. Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9jw64fer/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kde7ez07-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9jw64fer/psutil/
  10. You are using pip version 8.1.2, however version 19.0.3 is available.
  11. You should consider upgrading via the 'pip install --upgrade pip' command.

解决方法:

  1. yum install python36-devel

发表评论

表情:
评论列表 (有 0 条评论,702人围观)

还没有评论,来说两句吧...

相关阅读