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
Run python on ubuntu to connect to pg. the following error occurs: ImportError: No module named psycopg2, ttupythonRun python on ubuntu to connect to pg. The error ImportError: No module named psycopg2 is returned.Root @ pgproxy1 :~ #
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
Debian Department:
The code is as follows
Copy Code
Apt-get Install Libpq-dev Python-dev
Redhat Department:
The code is as follows
Copy Code
Yum Install Libpqxx-devel Python-devel
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
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.