2.安装postgres 的依赖 yum install postgresql-devel 3.再安装 pip install psycopg2-binary OK
在确认pg_config可用后,你可以再次尝试安装psycopg2: bash pip3 install psycopg2 如果你希望避免编译安装过程,也可以考虑使用预编译的二进制包psycopg2-binary: bash pip3 install psycopg2-binary 如果问题依旧,检查环境变量配置是否正确: 如果上述步骤仍然无法解决问题,你需要检查环境变量是否配置正确。确保pg_config...
command:/usr/bin/python3 -u -c'import sys, setuptools, tokenize; sys.argv[0] ='"'"'/tmp/pip-install-xr58_vty/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xr58_vty/psycopg2/setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"', open)(__file__);code=f.read()....
2.7.4 ~ 2.8 之间为过渡期,使用 psycopg2 的预编译二进制时会生成警告 新增了 psycopg2-binary 包,除了仍旧提供预编译二进制外,与 psycopg2 完全一致(即与老版本行为一致)。 解决方案 $ pipinstallpsycopg2-binary==2.8.4 注:由于目前 Python 的包管理机制,psycopg2 和 psycopg2-binary 虽然可以共存,但删的时候...
ERROR: Command errored out with exit status 1:command: /opt/AN/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lkf6b0y5/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lkf6b0y5/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"...
不幸的是,当我尝试 pip install 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/clang' failed with exit status 1 ld: library not found for -lssl clang: error: linker ...
pip install psycopg2-binary curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py python get-pip.py pip install psycopg2-binary 重新安装下python2的pip 用一个例子来演示会更加清晰
我无法在我的 M1 Mac 上安装 psycopg2,我使用的是 pip3。 当我尝试使用pip3installpsycopg2安装时,输出如下: ERROR: Command errored out with exit status 1: command: /opt/homebrew/opt/python@3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m5...
### 问题背景 `pip install psycopg2` 是用于安装 `psycopg2` 库的命令,该库是一个用于连接 PostgreSQL 数据库的适配器。它允许 Python 程序与 Po...
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py python get-pip.pypip install psycopg2-binary 重新安装下python2的pip