AIX Open Source

 View Only
  • 1.  Install oracleDB python module which is not in the toolbox

    Posted 21 days ago
    Hello.
     
    I can't install the python oracledb library on an aix 7.2 server.
    For context:
     
    I'm trying to create an interface program to load the contents of an XML file into several Oracle database tables.
    On my workstation, I've created a test program using:
    - The python lxml library for reading and transforming the XML file
    - The python oracledb library for updating the database.
     
    On the server, 
    - I installed the lxml library via the AIX Toolbox python3.9-lxml package.
    - I couldn't find any packaging for the oracledb library or its earlier version cx_oracle on AIX Toolbox.
    Using pip install oracledb on a venv returns the error here ...
    ******
    Requirement already satisfied: pip in ./venv/lib/python3.9/site-packages (24.0)
    => Installation des biblioth�ques sp�cifiques
    Collecting oracledb
      Using cached oracledb-2.2.1.tar.gz (580 kB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Requirement already satisfied: cryptography>=3.2.1 in /usr/opt/freeware/lib64/python3.9/site-packages (from oracledb) (3.4.7)
    Requirement already satisfied: cffi>=1.12 in /usr/opt/freeware/lib64/python3.9/site-packages (from cryptography>=3.2.1->oracledb) (1.13.2)
    Requirement already satisfied: pycparser in /usr/opt/freeware/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.2.1->oracledb) (2.19)
    Building wheels for collected packages: oracledb
      Building wheel for oracledb (pyproject.toml): started
      Building wheel for oracledb (pyproject.toml): finished with status 'error'
      error: subprocess-exited-with-error
      
      Building wheel for oracledb (pyproject.toml) did not run successfully.
      exit code: 1
      
      [43 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.aix-7205-2345-64-cpython-39
      creating build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/__init__.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/aq.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/connect_params.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/connection.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/constants.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/constructors.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/cursor.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/dbobject.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/defaults.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/driver_mode.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/dsn.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/errors.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/exceptions.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/fetch_info.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/future.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/lob.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/pool.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/pool_params.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/soda.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/subscr.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/utils.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/var.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/version.py -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      copying src/oracledb/py.typed -> build/lib.aix-7205-2345-64-cpython-39/oracledb
      running build_ext
      Compiling src/oracledb/base_impl.pyx because it changed.
      [1/1] Cythonizing src/oracledb/base_impl.pyx
      building 'oracledb.base_impl' extension
      creating build/temp.aix-7205-2345-64-cpython-39
      creating build/temp.aix-7205-2345-64-cpython-39/src
      creating build/temp.aix-7205-2345-64-cpython-39/src/oracledb
      cc -Wno-unused-result -Wsign-compare -DNDEBUG -g -O2 -Wall -I/opt/freeware/include -I/usr/include -DAIX_GENUINE_CPLUSCPLUS -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -I/opt/freeware/include -I/usr/include -DAIX_GENUINE_CPLUSCPLUS -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -O -qmaxmem=-1 -qro -qspill=30000 -U__STR__ -DNLS_ASIA -DORE -D_BSD -DRIOS -DAIXRIOS $(INCLUDE_FLAGS) -I/home/applmgr/gmn/interface_opus/venv/include -I/opt/freeware/include/python3.9 -c src/oracledb/base_impl.c -o build/temp.aix-7205-2345-64-cpython-39/src/oracledb/base_impl.o
      cc: error: $(INCLUDE_FLAGS): No such file or directory
      cc: error: unrecognized command-line option '-qmaxmem=-1'
      cc: error: unrecognized command-line option '-qro'
      cc: error: unrecognized command-line option '-qspill=30000'
      error: command '/usr/bin/cc' failed with exit code 1
      [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for oracledb
    Failed to build oracledb
    ERROR: Could not build wheels for oracledb, which is required to install pyproject.toml-based projects
    ******
    gcc on prereq : 
    gcc -v 
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/opt/freeware/bin/../libexec/gcc/powerpc-ibm-aix7.2.0.0/10/lto-wrapper
    Target: powerpc-ibm-aix7.2.0.0
    Configured with: ../gcc-10.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --enable-languages=c,c++,fortran,go --enable-version-specific-runtime-libs --disable-nls --disable-libstdcxx-pch --disable-werror --enable-libstdcxx-filesystem-ts --with-gcc-major-version-only --program-suffix=-10 --with-cpu=default32 --host=powerpc-ibm-aix7.2.0.0
    Thread model: aix
    Supported LTO compression algorithms: zlib
    gcc version 10.3.0 (GCC) 
     
    Thank you for your help
    Best regards,
    Fred


    ------------------------------
    Frederic PONCE
    ------------------------------


  • 2.  RE: Install oracleDB python module which is not in the toolbox

    Posted 20 days ago

    Hey @Frederic PONCE,

    Check this out,

    https://community.ibm.com/community/user/power/discussion/aix-73-issue-with-gcc-and-pythonpip-install-need-help-with-what-environmental-item-i-am-missing

    let me know if you still have issues.



    ------------------------------
    Priyesh Manwatkar (Senior Manager)
    Sr. Tech Analyst-EA Design Solutioning
    HDFC BANK
    Mumbai, India.
    ------------------------------