psycopg2 - 将 psycopg2-binary 与 pip install -r requirements.txt 一起使用
问题描述
我在 M1 Mac (11.2.3) 上运行 Python 3.9。我无法安装 psycopg2,但能够 pip install psycopg2-binary。但是,当我尝试通过 pip install -r requirements.txt 安装所有项目依赖项时,我仍然收到以以下结尾的 psycopg2 错误:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/gcc' failed with exit code 1
错误之前的命令是:
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
我已经尝试了在安装 psycopg2 时可以找到的每个 google / stackoverflow 答案,但没有一个成功。任何有关安装 psycopg2 或让我的其他依赖项与 psycopg2-binary 一起工作的提示将不胜感激。让我知道更多错误输出是否会有所帮助。
解决方案
推荐阅读
- angular - Angular 在其他组件中获取可观察值
- c# - 计时器事件显示的表单无法正确呈现
- javascript - 然后在构造函数中使用这个集合
- javascript - React 中的 HTML 复选框
- javascript - Chrome 中未获取变量的值
- reactjs - 连接两个看起来相同的枚举的更好方法
- python - “write_timeout”在 pyserial 中的 Serial() 中不起作用
- php - 从数组对象(php)中获取特定数据
- html - 当内容溢出浏览器窗口时,用 div 替换 html 表格布局
- javascript - 将 CSS 类添加到 Vue 禁用的按钮