Please login or register. November 14, 2019, 06:42:38 PM

Author Topic: PYTHON INSTALLATION  (Read 445 times)

0 Members and 1 Guest are viewing this topic.

tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #10 on: October 25, 2019, 02:28:07 PM »
Hello Michael,

Thanks for your quick reply. Yes,  We need 64 bit python for version 3.6 as we are using it for AWS lambda service(it is not supporting latest version of python 3.7).

As I stated earlier I am completely new bee to Python. Could you please help us in installing python & related packages on AIX 7.1 (64 bit) OS. I did not find any other blogs except yours which is more informative and helpful.

Could you please help us with proper installation steps and supported packages to achieve this.

Meanwhile I will also try to explore on installing xlc on AIX with my system admin's  help.

Thanks in advance.

BR,
Brahma.T

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #11 on: October 25, 2019, 03:08:17 PM »
I am nearly finished with the packaging of Python3-3.6.9. I'll provide it in "dual" format, with 64-bit being the default.

** Update ** The 32-bit and 64-bit builds are complete, but I lack the time, right now, to combine them. Will come asap.
« Last Edit: October 25, 2019, 03:57:57 PM by Michael »

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #12 on: October 26, 2019, 03:44:58 PM »
Python3-3.6.9 is packaged, 64-bit

== IMPORTANT ==
This is a 64-bit build. To use pip and compile modules that are not pure Python you will need to prefix

# export OBJECT_MODE=64

before the compiled code will succeed. You will need the IBM xlc compiler (gcc is not called! and probably will not work due to library GNU and GCC dependencies not needed when building using XLC.

tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #13 on: October 31, 2019, 06:46:27 AM »
Hello Michael,

Could you please help us with compiler isntallation steps on AIX 7.1. Please provide us the packages if possible.

Regards,
Brahma.T

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #14 on: October 31, 2019, 07:07:54 AM »
A) I cannot provide the IBM compiler. That is a Licensed Product (LPP is, if I recall correct Licensed Program Product), and when from IBM - that usually means there is both a license and support fee involved. Check your Passport Advantage page to see if you already have it licensed.

B) In case you do not, there is a "Try and Buy" possibility on this page: https://www.ibm.com/us-en/marketplace/xl-c-aix-compiler-power

C) Installation is actually quite simple:
    Download/Insert DVD
    smitty easy_install, and select the appropriate bundle

This is how I have been doing it, in a generic sense, for over 20 years. There are additional, little, optional things that I do - such as adjust my PATH.

I'll see what I can do for creating wheels. The more time-consuming way is the way I want them to be working; the easier way might be to bring my AIX version to your AIX version OR not use wheels at all (which has been the path in the past).

Ansible, iirc.

tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #15 on: November 01, 2019, 07:07:48 AM »
Hello Michael,

Our AIX team has installed compiler post which we tried to install python which ended with same error. Please suggest what did we miss?

root@ztapp08:/opt/lib # lslpp -l | grep -i xlc*

  xlC.adt.include           12.1.0.1  APPLIED    C Set ++ Application
  xlC.aix61.rte             13.1.3.1  COMMITTED  IBM XL C++ Runtime for AIX 6.1
  xlC.cpp                    9.0.0.0  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.rte         12.1.0.4  APPLIED    IBM XL C++ Runtime
  xlC.rte                   13.1.3.1  COMMITTED  IBM XL C++ Runtime for AIX
  xlC.sup.aix50.rte          9.0.0.1  COMMITTED  XL C/C++ Runtime for AIX 5.2
  xlsmp.aix43.rte    99.99.9999.9999  COMMITTED  Supersede entry, not installed
  xlsmp.aix50.rte    99.99.9999.9999  COMMITTED  Supersede entry, not installed
  xlsmp.aix52.rte    99.99.9999.9999  COMMITTED  Supersede entry, not installed
  xlsmp.aix53.rte            3.1.0.6  APPLIED    SMP Runtime Libraries for AIX
  xlsmp.msg.en_US.rte        3.1.0.6  APPLIED    XL SMP Runtime Messages - U.S.
  xlsmp.rte                  3.1.0.6  APPLIED    SMP Runtime Library


==========================Please see the ansible installation error below==========

soa@ztapp08:/home/soa # sudo su -

root@ztapp08:/home/root # pip3 install ansible

Collecting ansible
  Downloading https://files.pythonhosted.org/packages/59/3a/5b8aeca9b0b68e7a02fdfd7260f265be3b0605839d7367501aba4bcb2e14/ansible-2.9.0.tar.gz (14.1MB)
    100% |################################| 14.1MB 567kB/s
Collecting jinja2 (from ansible)
  Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting PyYAML (from ansible)
  Using cached https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz
Collecting cryptography (from ansible)
  Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
  Installing build dependencies ... error
  Complete output from command /opt/bin/python3.7 /opt/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ietxfpzj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.6.0 wheel "cffi>=1.8,!=1.11.3; platform_python_implementation != 'PyPy'":
  Collecting setuptools>=40.6.0
    Using cached https://files.pythonhosted.org/packages/d9/de/554b6310ac87c5b921bc45634b07b11394fe63bc4cb5176f5240addf18ab/setuptools-41.6.0-py2.py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
  Collecting cffi!=1.11.3,>=1.8
    Using cached https://files.pythonhosted.org/packages/0d/aa/c5ac2f337d9a10ee95d160d47beb8d9400e1b2a46bb94990a0409fe6d133/cffi-1.13.1.tar.gz
  Collecting pycparser (from cffi!=1.11.3,>=1.8)
    Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
  Installing collected packages: setuptools, wheel, pycparser, cffi
    Running setup.py install for pycparser: started
      Running setup.py install for pycparser: finished with status 'done'
    Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      Complete output from command /opt/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-rl67lgt4/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-crkiudrp/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-ietxfpzj/overlay --compile:
      unable to execute 'xlc_r': No such file or directory
      unable to execute 'xlc_r': No such file or directory

          No working compiler found, or bogus compiler options passed to
          the compiler from Python's standard "distutils" module.  See
          the error messages above.  Likely, the problem is not related
          to CFFI but generic to the setup.py of any Python package that
          tries to compile C code.  (Hints: on OS/X 10.8, for errors about
          -mno-fused-madd see http://stackoverflow.com/questions/22313407/
          Otherwise, see https://wiki.python.org/moin/CompLangPython or
          the IRC channel #python on irc.freenode.net.)

          Trying to continue anyway.  If you are trying to install CFFI from
          a build done in a different context, you can ignore this warning.

      running install
      running build
      running build_py
      creating build
      creating build/lib.aix-7.1-3.7
      creating build/lib.aix-7.1-3.7/cffi
      copying cffi/__init__.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/api.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/backend_ctypes.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/cffi_opcode.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/commontypes.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/cparser.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/error.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/ffiplatform.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/lock.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/model.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/pkgconfig.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/recompiler.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/setuptools_ext.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/vengine_cpy.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/vengine_gen.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/verifier.py -> build/lib.aix-7.1-3.7/cffi
      copying cffi/_cffi_include.h -> build/lib.aix-7.1-3.7/cffi
      copying cffi/parse_c_type.h -> build/lib.aix-7.1-3.7/cffi
      copying cffi/_embedding.h -> build/lib.aix-7.1-3.7/cffi
      copying cffi/_cffi_errors.h -> build/lib.aix-7.1-3.7/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.aix-7.1-3.7
      creating build/temp.aix-7.1-3.7/c
      xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -I/opt/include -O2 -qmaxmem=-1 -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python3.7m -c c/_cffi_backend.c -o build/temp.aix-7.1-3.7/c/_cffi_backend.o
      unable to execute 'xlc_r': No such file or directory
      error: command 'xlc_r' failed with exit status 1

      ----------------------------------------
  Command "/opt/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-rl67lgt4/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-crkiudrp/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-ietxfpzj/overlay --compile" failed with error code 1 in /tmp/pip-install-rl67lgt4/cffi/
  You are using pip version 19.0.3, however version 19.3.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.

  ----------------------------------------
Command "/opt/bin/python3.7 /opt/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ietxfpzj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools>=40.6.0 wheel "cffi>=1.8,!=1.11.3; platform_python_implementation != 'PyPy'"" failed with error code 1 in None
You are using pip version 19.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.



Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #16 on: November 01, 2019, 08:21:46 AM »
That is the runtime environment - not the compiler.

root@x066:[/]lslpp -L | egrep -i "vac|xlc"
  vac.C                    11.1.0.20    C     F    IBM XL C Compiler
  vac.aix53.lib            11.1.0.20    C     F    XL C for AIX Libraries for AIX
  vac.include              11.1.0.20    C     F    IBM XL C Compiler Include
  vac.lib                  11.1.0.20    C     F    XL C for AIX Libraries
  vac.lic                   11.1.0.0    C     F    XL C for AIX Licence Files
  vac.msg.en_US.C          11.1.0.20    C     F    XL C for AIX Compiler
  vacpp.cmp.aix53.lib      11.1.0.20    C     F    IBM XL C/C++ Libraries for AIX
  vacpp.cmp.aix53.tools    11.1.0.20    C     F    IBM XL C/C++ Tools for AIX 5.3
  vacpp.cmp.core           11.1.0.20    C     F    IBM XL C/C++ Compiler
  vacpp.cmp.include        11.1.0.20    C     F    IBM XL C/C++ Compiler Include
  vacpp.cmp.lib            11.1.0.20    C     F    IBM XL C/C++ Libraries
  vacpp.cmp.rte            11.1.0.20    C     F    IBM XL C/C++ Compiler
  vacpp.cmp.tools          11.1.0.20    C     F    IBM XL C/C++ Tools
  vacpp.lic                 11.1.0.0    C     F    IBM XL C/C++ Licence Files
  vacpp.licAgreement        11.1.0.0    C     F    IBM XL C++ Electronic License
  vacpp.memdbg.aix53.lib   11.1.0.20    C     F    IBM XL C/C++ User Heap/Memory
  vacpp.memdbg.aix53.rte   11.1.0.20    C     F    IBM XL C/C++ User Heap/Memory
  vacpp.memdbg.lib         11.1.0.20    C     F    IBM XL C/C++ User Heap and
  vacpp.memdbg.rte         11.1.0.20    C     F    IBM XL C/C++ User Heap and
  vacpp.msg.en_US.cmp.core
  vacpp.msg.en_US.cmp.tools
  xlC.adt.include           12.1.0.1    C     F    C Set ++ Application
  xlC.aix61.rte             12.1.0.3    C     F    IBM XL C++ Runtime for AIX 6.1
  xlC.cpp                    9.0.0.0    C     F    C for AIX Preprocessor
  xlC.msg.en_US.cpp          9.0.0.0    C     F    C for AIX Preprocessor
  xlC.msg.en_US.rte         12.1.0.3    C     F    IBM XL C++ Runtime
  xlC.rte                   12.1.0.3    C     F    IBM XL C++ Runtime for AIX
  xlC.sup.aix50.rte          9.0.0.1    C     F    XL C/C++ Runtime for AIX 5.2


vac.C is the base C compiler, vacpp.cmp.* is the C++ compiler.

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #17 on: November 01, 2019, 08:25:04 AM »
I have my wheels, but need to test them in different setups.

For some added information on Python and wheels - take a look at my "three part" series starting with http://www.rootvg.net/content/view/844