Please login or register. November 14, 2019, 07:33:14 PM

Author Topic: PYTHON INSTALLATION  (Read 447 times)

0 Members and 1 Guest are viewing this topic.

tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
PYTHON INSTALLATION
« on: October 14, 2019, 01:03:46 PM »
Hello,

Could you please help me with detailed installation steps for python 3.

I got the below error while trying to run the command mentioned in the AIX TOOLS . (WE ARE USING AIX 7.1 )

root@ztapp03:/home/root # sudo apt-get install dirmgr
sudo: apt-get: command not found
root@ztapp03:/home/root # installp -d aixtools.python3.3.6.5.0.64bit.I -a all
installp:  bosboot verification starting...
installp:  bosboot verification completed.
installp:  bosboot process starting...

bosboot: Boot image is 51228 512 byte blocks.
0503-292 This update will not fully take effect until after a
        system reboot.

    * * *  A T T E N T I O N  * * *
    System boot image has been updated. You should reboot the
    system as soon as possible to properly integrate the changes
    and to avoid disruption of current functionality.

installp:  bosboot process completed.
installp: Device aixtools.python3.3.6.5.0.64bit.I could not be accessed.
        Specify a valid device name.


Kindly help me with proper installation steps.

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #1 on: October 15, 2019, 04:21:41 PM »
Hello,

Could you please help me with detailed installation steps for python 3.

I got the below error while trying to run the command mentioned in the AIX TOOLS . (WE ARE USING AIX 7.1 )

root@ztapp03:/home/root # sudo apt-get install dirmgr
sudo: apt-get: command not found

a) what info on aixtools mentions apt-get? I would like to know because that is an error. apt-get is a debian command, not AIX.

root@ztapp03:/home/root # installp -d aixtools.python3.3.6.5.0.64bit.I -a all
installp:  bosboot verification starting...
installp:  bosboot verification completed.
installp:  bosboot process starting...

bosboot: Boot image is 51228 512 byte blocks.
0503-292 This update will not fully take effect until after a
        system reboot.

    * * *  A T T E N T I O N  * * *
    System boot image has been updated. You should reboot the
    system as soon as possible to properly integrate the changes
    and to avoid disruption of current functionality.

installp:  bosboot process completed.

b) if bosboot got involved, then you have a prior install operation that had not finished. But congradulations, the change to the boot area (hd5) has been processed successfully.

FYI: my python packaging would never trigger that part of installp.

installp: Device aixtools.python3.3.6.5.0.64bit.I could not be accessed.
        Specify a valid device name.
c) the file aixtools.python3.3.6.5.0.64bit.I is acceptable as an argument to installp. Rather that look in a directory for a file named .toc it reads ONLY the argument given as a filename. Since, apparently, the aixtools.python3.3.6.5.0.64bit.I was not in the current directory it was not found, and you get the error message.


Kindly help me with proper installation steps.

Please provide a link that you read, and failed to provide clear enough instructions - I'll update that and comment back here.


tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #2 on: October 16, 2019, 09:03:37 AM »
Hello ,

Thanks for your response. I was referring to http://www.aixtools.net/index.php/python3.

I am new to python and not found enough information to install python AIX servers. Could you please help (provide) me with proper installation steps and setup file & packages to install  on AIX 7.1.

BR,
Brahma.T

 

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #3 on: October 16, 2019, 11:19:42 AM »
I’ll update the instructions. That will be tomorrow when I have normal network access.

tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #4 on: October 22, 2019, 05:39:37 AM »
Hello ,

Could you please help us with proper installation steps on how to install python 3.6 on AIX 7.1 and required files and packages to be installed and from where we can download the file.

Regards,
Brahma.T

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #5 on: October 22, 2019, 01:39:25 PM »
I'll try and get that done asap. I have been distracted by all the recent updates to python.

Basically, you need to download one of the latest versions, e.g., python3-3.7.4.2.I (.I for installp).

As it has no other requirements (other than perhaps openssl.base which you need to get via IBM) you can choose to install only "the file", while normally, installp reads a .toc (table of contents) of the installp files in a directory.

So, if you download http://download.aixtools.net/tools/aixtools.python3.3.7.4.2.I, lets say to /tmp/aixtools

Both commands are equivalent - "preview" commands

# installp -d /tmp/aixtools -aYp aixtools.python3
# installp -d /tmp/aixtools/aixtools.python3.3.7.4.2.I -aYp all

And the real install commands:

# installp -d /tmp/aixtools -aY aixtools.python3
# installp -d /tmp/aixtools/aixtools.python3.3.7.4.2.I -aY all


I hope this helps enough, for now. I'll work on the wiki later.

tbramha

  • Jr. Member
  • **
  • Posts: 8
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #6 on: October 24, 2019, 11:50:10 AM »
Hello Michael,

Thanks a lot for the help. I have installed python 3.6 using installp -d aixtools.python3.3.6.5.0.64bit.I -a all command. and python installed by default under /opt/bin (is it possible to  change the default location ?) .

While installing ansible (Using pip3 install ansible) ,  it failed with below error. Please help me as I am unable to find what is this error all about?


soa@ztapp03:/opt/app # pip3 install ansible
Collecting ansible
  Using cached https://files.pythonhosted.org/packages/1b/5c/8a59aba5ca0d40df673aab53d51e9f5890a9c2135c299a909aed5fdee164/ansible-2.8.6.tar.gz
Collecting jinja2
  Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting PyYAML
  Using cached https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz
Collecting cryptography
  Using cached https://files.pythonhosted.org/packages/be/60/da377e1bed002716fb2d5d1d1cab720f298cb33ecff7bf7adea72788e4e4/cryptography-2.8.tar.gz
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/bin/python3.6 /opt/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-2zys6yt8/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'"'"''
       cwd: None
  Complete output (67 lines):
  Collecting setuptools>=40.6.0
    Using cached https://files.pythonhosted.org/packages/6a/9a/50fadfd53ec909e4399b67c74cc7f4e883488035cfcdb90b685758fa8b34/setuptools-41.4.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
    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'
      ERROR: Command errored out with exit status 1:
       command: /opt/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rqg_5649/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rqg_5649/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-fj49ewuv/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-2zys6yt8/overlay --compile
           cwd: /tmp/pip-install-rqg_5649/cffi/
      Complete output (48 lines):
      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.6
      creating build/lib.aix-7.1-3.6/cffi
      copying cffi/__init__.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/api.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/backend_ctypes.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/cffi_opcode.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/commontypes.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/cparser.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/error.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/ffiplatform.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/lock.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/model.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/pkgconfig.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/recompiler.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/setuptools_ext.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/vengine_cpy.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/vengine_gen.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/verifier.py -> build/lib.aix-7.1-3.6/cffi
      copying cffi/_cffi_include.h -> build/lib.aix-7.1-3.6/cffi
      copying cffi/parse_c_type.h -> build/lib.aix-7.1-3.6/cffi
      copying cffi/_embedding.h -> build/lib.aix-7.1-3.6/cffi
      copying cffi/_cffi_errors.h -> build/lib.aix-7.1-3.6/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.aix-7.1-3.6
      creating build/temp.aix-7.1-3.6/c
      xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5 -q64 -I/usr/include/ffi -I/usr/include/libffi -I/opt/include/python3.6m -c c/_cffi_backend.c -o build/temp.aix-7.1-3.6/c/_cffi_backend.o
      unable to execute 'xlc_r': No such file or directory
      error: command 'xlc_r' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /opt/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rqg_5649/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rqg_5649/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-fj49ewuv/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-2zys6yt8/overlay --compile Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /opt/bin/python3.6 /opt/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-2zys6yt8/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'"'"'' Check the logs for full command output.



BR,
Brahma.T



Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #7 on: October 24, 2019, 12:09:24 PM »
Simply put, you do not have xlc (c compiler) so you cannot compile the python module cffi.

I am working on getting wheels to work. I'll write more on that asap.

Work (aka RL) prevents me working on this today. I have been working on this, and am close.

* as to /opt/bin - I could put things elsewhere, but I do not want to use areas that IBM might use - and break anything. Likewise, IBM packages are not likely to break anything I package.

tbramha

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

I found this https://www.ibm.com/developerworks/aix/library/au-c_installation/index.html (IBM XL C/C++ installation on IBM AIX 7.1). Shall we follow this to install xlc ?

Need your suggestion on this.

BR,
Brahma.T

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1169
  • Karma: +0/-0
Re: PYTHON INSTALLATION
« Reply #9 on: October 25, 2019, 02:02:16 PM »
Yes, you could follow that procedure to install xlC. On AIX I have traditionally just installed xlC using the installp bundles provided.

Note: I have not read that article in detail. But the process to install xlC has not changed in 20+ years.

I am going to be looking at installing a newer version of Python. Do you need a 64-bit Python? If so, I'll update the current versions with a 64-bit one. Most people only want the 32-bit version, so I have stopped with building both.

The version you keep mentioning is an older release of Python3. The latest release of Python3-3.6 is v3.6.9 if I recall correctly.

Hope this helps!

Michael