我正在尝试使用以下方法在centos linux服务器上安装气流:
sudo pip3 install apache-airflow
它安装了许多库,但是在某些时候它正在中断。我尝试更新setuptools,但没有帮助。任何帮助将不胜感激。
这是我得到的错误:
Using cached https://files.pythonhosted.org/packages/15/a1/522dccd23e5d2e47aed4b6a16795b8213e3272c7506e625f2425ad025a19/Babel-2.8.0-py2.py3-none-any.whlCollecting defusedxml (from python3-openid>=2.0->Flask-OpenID<2,>=1.2.5->flask-appbuilder~=2.2; python_version >= "3.6"->apache-airflow)
Using cached https://files.pythonhosted.org/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whlInstalling collected packages: cached-property, croniter, docutils, lockfile, python-daemon, argcomplete, json-merge-patch, graphviz, PyYAML, flask-swagger, tenacity, iso8601, cattrs, termcolor, pygments, text-unidecode, flask-login, unicodecsv, setproctitle, markdown, marshmallow, prison, colorama, dnspython, idna, email-validator, defusedxml, python3-openid, Flask-OpenID, marshmallow-sqlalchemy, PyJWT, Flask-JWT-Extended, marshmallow-enum, Flask-SQLAlchemy, sqlalchemy-utils, apispec, pytz, Babel, Flask-Babel, flask-appbuilder, pytzdata, tzlocal, pendulum, typing, sqlalchemy-jsonfield, tabulate, future, configparser, flask-admin, dill, psutil, chardet, certifi, urllib3, requests, flask-caching, funcsigs, numpy, pandas, apache-airflow
Running setup.py install for json-merge-patch ... done
Running setup.py install for PyYAML ... done
Running setup.py install for flask-swagger ... done
Running setup.py install for termcolor ... done
Running setup.py install for flask-login ... done
Running setup.py install for unicodecsv ... done
Running setup.py install for setproctitle ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mbin4wo1/setproctitle/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-75i8wqqm-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_ext building 'setproctitle' extension creating build creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSPT_VERSION=1.1.10 -DHAVE_SYS_PRCTL_H=1 -I/usr/include/python3.6m -c src/setproctitle.c -o build/temp.linux-x86_64-3.6/src/setproctitle.o In file included from src/spt.h:15:0, from src/setproctitle.c:14: src/spt_python.h:14:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mbin4wo1/setproctitle/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-75i8wqqm-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-mbin4wo1/setproctitle/