Failed building wheel for psycopg2

1、linux 平台

使用 airflow 初始化 “airflow initdb” 时,报psycopg2模块找不到。

安装 psycopg2,报 Failed building wheel for psycopg2

pip install psycopg2 -i https://pypi.douban.com/simple

所以直接安装 psycopg2-binary

pip install psycopg2-binary -i https://pypi.douban.com/simple

参考:https://blog.csdn.net/weixin_42539198/article/details/89173240

2、windows 平台

将 python 命令和 pip 命令都配置进环境变量PATH

 

---

原文地址:https://www.cnblogs.com/xy-ouyang/p/12895326.html