在执行 pip install 时遇到错误:python setup.py egg_info...
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
在linux中安装airflow时,执行:
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
出现以上错误,看了很多博客,总结一下我的解决步骤。直接贴代码
sudo yum install openssl
sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
#进入python安装目录下执行以下命令
vi Modules/Setup
#在Modules/Setup配置文件中,找到SSL相关的部分,配置为本地的OpenSSL安装路径(本文中为/usr/local/openssl/)。
===========================
# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/openssl/ #取消这一行的注释,并将原来的/usr/local/ssl改为/usr/local/openssl/
_ssl _ssl.c \ #取消这一行的注释
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ #取消这一行的注释
-L$(SSL)/lib -lssl -lcrypto #取消这一行的注释
==========================================
make && make install
python -m pip install --upgrade setuptools
done.