如何在Windows中将psycopg2添加到python?

时间:2022-12-19 20:29:17

I need to connect to PostgreSQL in a python class, but I can't add psycopg2 to python34

我需要在python类中连接到PostgreSQL,但是我不能将psycopg2添加到python34

import psycopg2

I tried to run a command on the cmd but it didn't work.

我试图在cmd上运行命令,但它不起作用。

1 个解决方案

#1


0  

Download psycopg2 from GitHub https://github.com/nwcell/psycopg2-windows

从GitHub下载psycopg2 https://github.com/nwcell/psycopg2-windows

copy psycopg2 folder and paste it to yo

复制psycopg2文件夹并将其粘贴到yo

C:\Python34\Lib

C:\ Python34 \ Lib文件

Download PyCharm python editor for good

下载PyCharm python编辑器

#1


0  

Download psycopg2 from GitHub https://github.com/nwcell/psycopg2-windows

从GitHub下载psycopg2 https://github.com/nwcell/psycopg2-windows

copy psycopg2 folder and paste it to yo

复制psycopg2文件夹并将其粘贴到yo

C:\Python34\Lib

C:\ Python34 \ Lib文件

Download PyCharm python editor for good

下载PyCharm python编辑器