HomeMogDBMogDB StackUqbar
v3.1

Documentation:v3.1

Supported Versions:

Other Versions:

Loading a Driver

  • Before using the driver, perform the following operations:

    1. Decompress the driver package of the corresponding version and copy psycopg2 to the site-packages folder in the Python installation directory as the root user.
    2. Change the psycopg2 directory permission to 755.
    3. Add the psycopg2 directory to the environment variable $PYTHONPATH and validate it.
    4. For non-database users, configure the lib directory in LD_LIBRARY_PATH after decompression.
  • Load a database driver before creating a database connection:

    import  psycopg2
Copyright © 2011-2024 www.enmotech.com All rights reserved.