Python uses the psycopg2 module to operate PostgreSQL, psycopg2postgresql
In fact, there are many modules in Python that can be used to connect to PostgreSQL. Here we recommend psycopg2. Psycopg2 is very easy to install (pip install psycopg2). Here
Installation of psycopg2 on Windows and UbuntuLinux encountered an episode, recording the following Windows: 1. click here to go to the official website to download the source code 2. decompress 3. run pythonsetup. pyinstall error solution: the
Notes for installing psycopg2 on Ubuntu
Install psycopg2 on Windows and Ubuntu Linux.
Windows:
1. Click here to go to the official website to download the source code
2. Extract
3. Run python setup. py install and report an error.
Solution: the
Today, when installing PSYCOPG2 under centos6.5 and using Python to connect to the PostgreSQL database, there was a undefined symbol:lo_truncate6 error: Django.core.exceptions.ImproperlyConfigured:Error loading PSYCOPG2
PSYCOPG is a PostgreSQL database interface for the Python language . Its main advantage is full support for Python DB API 2.0, as well as secure multithreaded support. It is suitable for multi-threaded database applications that create, destroy
I. Overview of DB-APIPython supports a number of different databases. Because the different seller server causes the network protocol which communicates with the database to be different. In earlier versions of Python, each database had its own
ArticleDirectory
1. DB-API Overview
2. Database Connection
Iii. Simple operations (taking PostgreSQL as an example)
Iv. Parameter Style
5. Duplicate commands
6. fetchall, fetchtasks, and fetchone to obtain data
VII. Obtain
Use PSYCOPG2 to connect PostgreSQL download Psycopg2wgethttp://initd.org/psycopg/tarballs/PSYCOPG-2-7/psycopg2-2.7.1.tar.gzunzip the installation, or use PIP to installpip install psycopg2-2.7.1.tar.gz Error:Complete output from command python setup.
I. Overview of DB-API
Python supports a number of different databases. Because different seller servers result in different network protocols for database communication. In earlier versions of Python, each database had its own Python module, all of
This article mainly introduces the python database client DB-API related information, need a friend can refer to the next
1. DB-API Overview
Python supports many different databases. The network protocol for communication with databases varies
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.