pip 在 centos 7 中安装 fbprophet-错误:命令“gcc”失败,退出状态为 1

pip 在 centos 7 中安装 fbprophet-错误:命令“gcc”失败,退出状态为 1

我尝试pip install fbprophet在 CentOS 7 中安装适用于 Python 3.6 的 fbprophet,但遇到了

error: command 'gcc' failed with exit status 1

yum install python-devel我该如何解决这个问题?我尝试使用和安装 Python 开发标头yum install python36u-devel,但什么也没发生。

答案1

我将最新版本的 gcc 从 gcc 4 更新到了 gcc 8.99,它正常工作

答案2

我通过在 CentOS 上安装以下软件包来实现这个功能(可能不需要全部):

yum -y install centos-release-scl
yum -y install httpd httpd-tools rh-python38-python-mod_wsgi.x86_64 devtoolset-8-gcc devtoolset-8-gcc-c++ gcc gcc-c++  rh-python38-python rh-python38-python-devel unixODBC-devel libaio

./usr/bin/python3 /etc/get-pip.py

pip install -r /etc/pip-req.txt

/usr/local/bin/install-fb.sh
  • 内容pip-req.txt
absl-py==1.3.0
abydos==0.5.0
altair==4.2.0
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arviz==0.13.0
asttokens==2.0.5
astunparse==1.6.3
attrs==21.4.0
backcall==0.2.0
backports.zoneinfo==0.2.1
beautifulsoup4==4.11.1
bleach==5.0.0
blinker==1.4
blis==0.7.9
cachetools==5.0.0
catalogue==2.0.8
certifi==2021.10.8
cffi==1.15.0
cftime==1.6.2
charset-normalizer==2.0.12
click==8.0.4
cmdstanpy==0.9.5
colorama==0.4.6
confection==0.0.3
contourpy==1.0.6
convertdate==2.4.0
cx-Oracle==8.3.0
cycler==0.11.0
cymem==2.0.7
Cython==0.29.32
debugpy==1.6.0
decorator==5.1.1
defusedxml==0.7.1
deprecation==2.1.0
entrypoints==0.4
ephem==4.1.3
executing==0.8.3
fastjsonschema==2.15.3
Flask==2.1.2
flatbuffers==22.10.26
fonttools==4.38.0
fuzzywuzzy==0.18.0
gast==0.4.0
geographiclib==1.52
geopy==2.2.0
gitdb==4.0.9
GitPython==3.1.27
google-auth==2.14.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
greenlet==2.0.0.post0
grpcio==1.50.0
gunicorn==20.1.0
h5py==3.7.0
hijri-converter==2.2.4
hmni==0.1.8
holidays==0.16
idna==3.3
importlib-metadata==5.0.0
importlib-resources==5.7.1
ipykernel==6.13.0
ipython==8.3.0
ipython-genutils==0.2.0
ipywidgets==7.7.0
itsdangerous==2.1.2
jedi==0.18.1
Jinja2==3.1.2
joblib==1.1.0
jsonpickle==2.2.0
jsonschema==4.5.1
jupyter-client==7.3.1
jupyter-core==4.10.0
jupyterlab-pygments==0.2.2
jupyterlab-widgets==1.1.0
keras==2.10.0
Keras-Preprocessing==1.1.2
kiwisolver==1.4.4
korean-lunar-calendar==0.3.1
langcodes==3.3.0
libclang==14.0.6
LunarCalendar==0.0.9
Markdown==3.4.1
MarkupSafe==2.1.1
matplotlib==3.6.2
matplotlib-inline==0.1.3
mistune==0.8.4
mod-wsgi==4.6.8
munkres==1.1.4
murmurhash==1.0.9
nbclient==0.6.3
nbconvert==6.5.0
nbformat==5.4.0
nest-asyncio==1.5.5
netCDF4==1.6.1
networkx==2.8.7
notebook==6.4.11
numpy==1.23.4
oauthlib==3.2.2
opt-einsum==3.3.0
packaging==21.3
pandas==1.5.1
pandocfilters==1.5.0
parso==0.8.3
pathy==0.6.2
patsy==0.5.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.3.0
plotly==5.8.0
ply==3.11
pmdarima==1.8.5
preshed==3.0.8
prometheus-client==0.14.1
prompt-toolkit==3.0.29
protobuf==3.19.6
psutil==5.9.0
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==8.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pydantic==1.9.2
pydeck==0.7.1
Pygments==2.12.0
PyMeeus==0.5.11
Pympler==1.0.1
pyodbc==4.0.34
pyparsing==3.0.9
PyQt5==5.15.4
PyQt5-Qt5==5.15.2
PyQt5-sip==12.11.0
pyrsistent==0.18.1
pystan==2.19.1.1
python-dateutil==2.8.2
pytz==2022.6
pytz-deprecation-shim==0.1.0.post0
pyvis==0.2.0
pyzmq==22.3.0
requests==2.27.1
requests-oauthlib==1.3.1
rsa==4.9
scikit-learn==1.1.0
scipy==1.9.3
seaborn==0.11.2
semver==2.13.0
Send2Trash==1.8.0
setuptools-git==1.2
sip==6.7.4
six==1.16.0
smart-open==5.2.1
smmap==5.0.0
soupsieve==2.3.2.post1
spacy==3.4.1
spacy-legacy==3.0.10
spacy-loggers==1.0.3
SQLAlchemy==1.4.41
srsly==2.4.5
stack-data==0.2.0
statsmodels==0.13.2
tenacity==8.0.1
tensorboard==2.10.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.10.0
tensorflow-estimator==2.10.0
tensorflow-io-gcs-filesystem==0.27.0
termcolor==2.1.0
terminado==0.13.3
thinc==8.1.5
threadpoolctl==3.1.0
tinycss2==1.1.1
toml==0.10.2
toolz==0.11.2
tornado==6.2
tqdm==4.64.1
traitlets==5.2.0
typer==0.4.2
typing_extensions==4.4.0
tzdata==2022.1
tzlocal==4.2
ujson==5.5.0
unicodedata2==15.0.0
Unidecode==1.3.6
urllib3==1.26.9
validators==0.19.0
waitress==2.1.1
wasabi==0.10.1
watchdog==2.1.7
wcwidth==0.2.5
webencodings==0.5.1
Werkzeug==2.1.2
widgetsnbextension==3.6.0
wincertstore==0.2
wrapt==1.14.1
xarray==2022.11.0
xarray-einstats==0.3.0
xgboost==1.6.2
zipp==3.10.0

内容安装-fb.sh

#!/bin/bash
source /opt/rh/devtoolset-8/enable
pip install pystan==2.19.1.1 fbprophet==0.7.1

相关内容