Help Center/ FunctionGraph/ FAQs/ General FAQs/ How Can I Create an ODBC Drive-based Python Dependency Package for Database Query?
Updated on 2023-06-19 GMT+08:00

How Can I Create an ODBC Drive-based Python Dependency Package for Database Query?

For OS-dependent packages (for example, unixODBC), download the source code to compile dependency packages.

  1. Log in to your ECS on the ECS console (ensure that the GCC and Make tools have been installed), and run the following command to download the source code package:
    wget source code path

    If you downloaded a .zip file, run the following command to decompress it:

    unzip xxx/xx.zip 

    If you downloaded a tar.gz file, run the following command to decompress it:

    tar -zxvf xxx/xx.tar.gz
  2. Run the following command to create the /opt/function/code directory:
    mkdir /opt/function/code
  3. Go to the destination directory and run the following command:
    ./configure --prefix=/opt/function/code --sysconfdir=/opt/function/code;make;make install
  4. Go to /opt/function/code/lib/pkgconfig and check whether the prefix directory is /opt/function/code.
    cd /opt/function/code/lib/pkgconfig
  5. Copy all files in /opt/function/code/lib to /opt/function/code.
    cp -r /opt/function/code/lib/* /opt/function/code
  6. Switch to /opt/function/code and compress all files in it to a .zip package.
    cd /opt/function/code 
    zip -r xxx.zip *