1、使用pip命令安装psycopg2包
C:\Users\Douse>pip install psycopg2
Looking in indexes: https://pypi.doubanio.com/simple/
Collecting psycopg2
Downloading https://pypi.doubanio.com/packages/d6/eb/ba556d3d642fedf220e2e7e4f16085d6f1f0363a1670fc4b72a26f497c5c/psycopg2-2.8.6-cp39-cp39-win_amd64.whl (1.2 MB)
|████████████████████████████████| 1.2 MB 1.6 MB/s
Installing collected packages: psycopg2
Successfully installed psycopg2-2.8.6
2、查看psycopg2模块的详细信息
C:\Users\Douse>pip show psycopg2
Name: psycopg2
Version: 2.8.6
Summary: psycopg2 - Python-PostgreSQL Database Adapter
Home-page: https://psycopg.org/
Author: Federico Di Gregorio
Author-email: fog@initd.org
License: LGPL with exceptions
Location: d:\program files (x86)\python39\lib\site-packages
Requires:
Required-by:
3、python 连接po