2.安装postgres 的依赖 yum install postgresql-devel 3.再安装 pip install psycopg2-binary OK
先安装openssl,如果安装了,就跳过这步 brew install openssl 1. 查看openssl安装路径 brew --prefix openssl 1. 安装psycopg2-binary export LIBRARY_PATH=$(brew --prefix openssl)/lib:$LIBRARY_PATH pip install psycopg2-binary 1. 2.
bash pip install psycopg2_binary-X.Y.Z.tar.gz (请将X.Y.Z.tar.gz替换为你实际下载的文件名) 4. 验证安装是否成功 你可以通过运行以下Python代码来验证psycopg2-binary是否已成功安装: python import psycopg2 try: # 尝试连接到PostgreSQL数据库(这里使用的是一个示例连接字符串) conn = psycopg2.connect(...
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
1 brew install openssl 查看openssl安装路径 1 brew --prefix openssl 安装psycopg2-binary 1 2 export LIBRARY_PATH=$(brew --prefix openssl)/lib:$LIBRARY_PATH pip install psycopg2-binary 分类: 运维, 数据库 好文要顶 关注我 收藏该文 微信分享 NAVYSUMMER 粉丝- 38 关注- 2 +加关注 0 0 ...
sudo yum install python3-pip -y:使用yum命令安装pip3。 步骤2:安装psycopg2-binary库 psycopg2-binary是一个用于连接PostgreSQL数据库的Python库。通过pip3命令可以方便地安装它。 在终端中执行以下命令: pip3installpsycopg2-binary 1. 代码解释: pip3 install psycopg2-binary:使用pip3安装psycopg2-binary库。
If install failed, I typedpg_configon the command line and I obtained an output instead of an error. > Not applicable as I'm installing psycopg2-binary, not psycopg2 Please complete the following information: OS: Ubuntu 20.04 Psycopg version: All ...
error: legacy-install-failure Encountered error while trying to install package. psycopg2-binary note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. Notice: A new release of pip available: 22.2.2 -> 22.3 ...
## base imageFROMpython:3.7.4-alpine## install dependenciesRUNapk update&&\apk add --virtual build-deps gcc python-dev musl-dev&&\apk add postgresql-dev&&\apk add netcat-openbsd## set environment variablesENVPYTHONDONTWRITEBYTECODE1ENVPYTHONUNBUFFERED1## set working directoryWORKDIR/usr/src/app...
If you prefer to avoid building psycopg2 from source, please install the PyPI 'psycopg2-binary' package instead. 我很乐意回答任何可能导致解决方案的问题。另外,也许有人可以向我推荐一个关于 dockerizing django 应用程序的好教程? https://pythonspeed.com/articles/alpine-docker-python/- 我在那里写的其他...