1、Python.h:No such file or directory
In file included from yappi/_yappi.c:10:0:
yappi/config.h:4:20: 致命错误:Python.h:没有那个文件或目录
include "Python.h"
^
编译中断。
解决方法: yum install python-devel
2、unable to execute cc: No such file or directory
Complete output (14 lines):
unable to execute cc: No such file or directory
....
error: command 'gcc' failed with exit status 1
解决方法: yum install gcc
3、No such file or directory: '/tmp/pip-build-E6PudS/importlib-metadata/setup.py'
[root@172-26-201-207 yum.repos.d]# pip2.7 install virtualenv
Collecting virtualenv
Using cached https://files.pythonhosted.org/packages/9e/34/e86fc6a8f84329b49321a532b3c1fef103c67765df957fbb3852eea39d00/virtualenv-20.14.1-py2.py3-none-any.whl
Collecting importlib-metadata>=0.12; python_version < "3.8" (from virtualenv)
Using cached https://files.pythonhosted.org/packages/35/a8/f2bd0d488c2bf932b4dda0fb91cbb687c0b1132b33130d1cfad4e2b4b963/importlib_metadata-4.11.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-build-E6PudS/importlib-metadata/setup.py'
解决方法: pip install --upgrade pip
4、
[root@172-26-201-207 yum.repos.d]# python -m pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/4b/b6/0fa7aa968a9fa4ef63a51b3ff0644e59f49dcd7235b3fd6cceb23f202e08/pip-22.1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-URvwzZ/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
解决方法:手动升级
wget https://files.pythonhosted.org/packages/0b/f5/be8e741434a4bf4ce5dbc235aa28ed0666178ea8986ddc10d035023744e6/pip-20.2.4.tar.gz #下载安装包
tar -zxvf pip-20.2.4.tar.gz # 解压
cd pip-20.2.4/
sudo python setup.py install #给予权限不然可能安装失败
pip install -U pip #再次更新
网友评论