@[toc]
AirFlow 常见问题
安装问题
1、安装出现ERROR “python setup.py xxx” 。
问题:
第一需要你更新 pip 版本需要使用'pip install --upgrade pip' command.
第二是 setuptools 版本太旧,所以出现以下问题Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-G9yO9Z/tldr/,也是需要你更新
File "/tmp/pip-build-G9yO9Z/tldr/setuptools_scm-3.3.3-py2.7.egg/setuptools_scm/integration.py", line 9, in version_keyword
File "/tmp/pip-build-G9yO9Z/tldr/setuptools_scm-3.3.3-py2.7.egg/setuptools_scm/version.py", line 66, in _warn_if_setuptools_outdated
setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-G9yO9Z/tldr/
You are using pip version 8.1.2, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
##### 解决方法:
> (一)使用“pip install—upgrade pip”命令进行pip版本升级。
> [xiaokang@localhost ~]$ sudo pip install --upgrade pip
> (二)使用“ pip install --upgrade setuptools”命令进行setuptools 版本升级。
> [xiaokang@localhost ~]$ sudo pip install --upgrade setuptools
> 解决完以上问题你就可以成功安装上之前要安装的软件了
#### 2、ERROR: Cannot uninstall 'enum34' 。
##### 问题:
```python
在安装Airflow的时候,出现如下错误:
ERROR: Cannot uninstall 'enum34'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决方法:
sudo pip install --ignore-installed enum34
当出现其他无法升级的错误时,可以采用以下命令格式进行强制升级:
sudo pip install --ignore-installed +模块名
3、安装软件报错,提示软件包找不到
问题:ERROR: Command errored out with exit status 1:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-oZ2zgF/flask-appbuilder/setup.py'"'"'; __file__='"'"'/tmp/pip-install-oZ2zgF/flask-appbuilder/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-oZ2zgF/flask-appbuilder/pip-egg-info
cwd: /tmp/pip-install-oZ2zgF/flask-appbuilder/
Complete output (3 lines):
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
error in Flask-AppBuilder setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决方法:
检查安装命令,一般此类问题是因为安装包找不到才会出现的错误。
4、提示找不到Python.h 这个文件或目录
问题:src/spt_python.h:14:20: fatal error: Python.h: No such file or directory
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-YmiKzY/setproctitle/setup.py'"'"'; __file__='"'"'/tmp/pip-install-YmiKzY/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-record-XTav9_/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-YmiKzY/setproctitle/
Complete output (15 lines):
running install
running build
running build_ext
building 'setproctitle' extension
creating build
creating b