Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power


#Servers
#Opensource
 View Only
  • 1.  AIX installation cx_oracle.

    Posted 02/18/22 04:44 AM
    Hello,

    I'm trying to install cx_oracle with python pip.
    I upgraded python in the last version 

    <:1> (root)/home/root
    # python3 -V
    Python 3.7.12
    <:1> (root)/home/root
    # python3 -m pip list
    Package Version
    ---------- -------
    pip 20.1.1
    setuptools 47.1.0

    But I don't have internet connexion on my system and it want to connect to pypi.org for installing setuptools.
    root 30934042 16385066 0 09:49:10 pts/1 0:00 python3 -m pip install cx_Oracle-8.3.0.tar.gz
    root 36177030 30934042 0 09:49:12 pts/1 0:00 /usr/bin/python3 /opt/freeware/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /var/tmp/pip-build-env-q3k0uvlq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools >= 40.6.0 wheel

    Someone can help me?
    Regards.
    Jérôme.

    ------------------------------
    Jérôme BAILLY
    ------------------------------

    #AIXOpenSource


  • 2.  RE: AIX installation cx_oracle.

    Posted 02/18/22 04:51 AM
    Can you paste the entire output ?

    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: AIX installation cx_oracle.

    Posted 02/18/22 05:07 AM
    Hello,

    Here:
    <:1> (root)/mntnfs/EXPORT_PRODUIT/AIX/RPM_Python_3
    # python3 -m pip install cx_Oracle-8.3.0.tar.gz
    Processing ./cx_Oracle-8.3.0.tar.gz
    Installing build dependencies ... error
    ERROR: Command errored out with exit status 1:
    command: /usr/bin/python3 /opt/freeware/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /var/tmp/pip-build-env-q3k0uvlq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.6.0' wheel
    cwd: None
    Complete output (7 lines):
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0xa00000001011e08>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0xa0000000101ca88>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0xa0000000102e288>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0xa0000000102e848>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0xa0000000102edc8>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/setuptools/
    ERROR: Could not find a version that satisfies the requirement setuptools>=40.6.0 (from versions: none)
    ERROR: No matching distribution found for setuptools>=40.6.0
    ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/bin/python3 /opt/freeware/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /var/tmp/pip-build-env-q3k0uvlq/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.6.0' wheel Check the logs for full command output.

    Regards.

    ------------------------------
    Jérôme BAILLY
    ------------------------------



  • 4.  RE: AIX installation cx_oracle.

    Posted 02/18/22 06:16 AM

    Looks like this cx_Oracle module is not making use of the system installed setuptools. 
    You can use "python3 -m pip install --no-build-isolation cx_Oracle-8.3.0.tar.gz" 
    But before this , make sure python wheel is also installed. Otherwise it will fail trying to download wheel through pip. 



    ------------------------------
    Ayappan P
    ------------------------------



  • 5.  RE: AIX installation cx_oracle.

    Posted 02/18/22 08:58 AM
    I installed wheel with pip:
    <:1> (root)/mntnfs/EXPORT_PRODUIT/AIX/RPM_Python_3
    # python3 -m pip list
    Package Version
    ---------- -------
    pip 20.1.1
    setuptools 47.1.0
    wheel 0.37.1
    <:1> (root)/mntnfs/EXPORT_PRODUIT/AIX/RPM_Python_3

    But I already have an issue.

    #
    <:1> (root)/mntnfs/EXPORT_PRODUIT/AIX/RPM_Python_3
    # python3 -m pip install --no-build-isolation cx_Oracle-8.3.0.tar.gz
    Processing ./cx_Oracle-8.3.0.tar.gz
    Preparing wheel metadata ... done
    Building wheels for collected packages: cx-Oracle
    Building wheel for cx-Oracle (PEP 517) ... error
    ERROR: Command errored out with exit status 1:
    command: /usr/bin/python3 /opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/tmp/tmpsuh097_0
    cwd: /var/tmp/pip-req-build-lo4sqsx1
    Complete output (11 lines):
    running bdist_wheel
    running build
    running build_ext
    building 'cx_Oracle' extension
    creating build
    creating build/temp.aix-7.1-3.7
    creating build/temp.aix-7.1-3.7/src
    creating build/temp.aix-7.1-3.7/odpi
    creating build/temp.aix-7.1-3.7/odpi/src
    gcc -maix64 -fPIC -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -DCXO_BUILD_VERSION=8.3.0 -Iodpi/include -Iodpi/src -I/opt/freeware/include/python3.7m -c src/cxoApiType.c -o build/temp.aix-7.1-3.7/src/cxoApiType.o
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for cx-Oracle
    Failed to build cx-Oracle
    ERROR: Could not build wheels for cx-Oracle which use PEP 517 and cannot be installed directly

    Regards.

    ------------------------------
    Jérôme BAILLY
    ------------------------------



  • 6.  RE: AIX installation cx_oracle.

    Posted 02/18/22 10:27 AM
    Please install gcc rpm and make sure "/opt/freeware/bin" is in your PATH.

    ------------------------------
    Ayappan P
    ------------------------------



  • 7.  RE: AIX installation cx_oracle.

    Posted 02/21/22 03:03 AM
    Hello,

    Thank you for your help.
    The cx_oracle installation is done:

    <:1> (root)/mntnfs/EXPORT_PRODUIT/AIX/RPM_Python_3
    # python3 -m pip install --no-build-isolation cx_Oracle-8.3.0.tar.gz
    Processing ./cx_Oracle-8.3.0.tar.gz
    Preparing wheel metadata ... done
    Building wheels for collected packages: cx-Oracle
    Building wheel for cx-Oracle (PEP 517) ... done
    Created wheel for cx-Oracle: filename=cx_Oracle-8.3.0-cp37-cp37m-aix_7_1.whl size=280383 sha256=b5f6915b477dc02481672c1195dfbd825bdf25a7f3efe8cb5a53443bfd24acf5
    Stored in directory: /home/root/.cache/pip/wheels/aa/cf/f8/f0165096f890d85b744c122bdd19238ba97188f7cb905e2be0
    Successfully built cx-Oracle
    Installing collected packages: cx-Oracle
    Successfully installed cx-Oracle-8.3.0
    <:1> (root)/mntnfs/EXPORT_PRODUIT/AIX/RPM_Python_3
    # python3 -m pip list
    Package Version
    ---------- -------
    cx-Oracle 8.3.0
    pip 20.1.1
    setuptools 47.1.0
    wheel 0.37.1

    ------------------------------
    Jérôme BAILLY
    ------------------------------