简体   繁体   中英

How to access PostgreSQL database with python 3.5

I am using python 3.5 and I want to connect to a PostgreSQL database. What is the best driver to use? I would prefer psycopg2 but it only supports python 3.4 (at least officially).

Would psycopg2 work with python3.5? Where can I get Windows binaries to try it out?

Download : psycopg2-2.6.2.win32-py3.5-pg9.5.3-release.exe from HERE , then run the following in a Windows command prompt:

C:\\path\\to\\project> easy_install /path/to/ psycopg2-2.6.2.win32-py3.5-pg9.5.3-release.exe

Use this wiki as a guide to using psycopg2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM