初始化python环境:
yum install -y gcc libffi-devel python-devel openssl-devel gcc-c++
yum install -y python-pip
pip install --upgrade pip
报错:
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-QMyHST/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-fXgmJk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-QMyHST/scandir/
缺少某些功能模块,然后谷歌了一下,先后安装了python-devel,libffi-devel后还是不行,