AIX Open Source

 View Only
Expand all | Collapse all

scipy doesnt install on AIX 7.1 or 7.2

  • 1.  scipy doesnt install on AIX 7.1 or 7.2

    Posted Tue October 05, 2021 11:29 AM
    I was following the directions here:

    Installing and configuring Python machine learning packages on IBM AIX

    It installs numpy and pandas ok, but not scipy:

    Collecting scipy
    Downloading scipy-1.7.1.tar.gz (36.1 MB)
    |################################| 36.1 MB 9.5 MB/s
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
    command: /opt/freeware/bin/python3 /opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7ph6dypn
    cwd: /tmp/pip-install-40388gth/scipy
    Complete output (272 lines):
    Running scipy/linalg/_generate_pyx.py
    Running scipy/special/_generate_pyx.py
    Running scipy/stats/_generate_pyx.py
    Processing scipy/_lib/_ccallback_c.pyx
    Processing scipy/_lib/_test_deprecation_call.pyx
    Processing scipy/_lib/_test_deprecation_def.pyx
    Processing scipy/_lib/messagestream.pyx
    Processing scipy/cluster/_hierarchy.pyx
    Processing scipy/cluster/_optimal_leaf_ordering.pyx
    Processing scipy/cluster/_vq.pyx
    Processing scipy/fftpack/convolve.pyx
    Processing scipy/interpolate/_bspl.pyx
    Processing scipy/interpolate/_ppoly.pyx
    Processing scipy/interpolate/interpnd.pyx
    Processing scipy/io/matlab/mio5_utils.pyx
    Processing scipy/io/matlab/mio_utils.pyx
    Processing scipy/io/matlab/streams.pyx
    Processing scipy/linalg/_decomp_update.pyx.in
    Processing scipy/linalg/_matfuncs_sqrtm_triu.pyx
    Processing scipy/linalg/_solve_toeplitz.pyx
    Processing scipy/linalg/cython_blas.pyx
    Processing scipy/linalg/cython_lapack.pyx
    Processing scipy/ndimage/src/_cytest.pyx
    Processing scipy/ndimage/src/_ni_label.pyx
    Processing scipy/optimize/_bglu_dense.pyx
    Processing scipy/optimize/_group_columns.pyx
    Processing scipy/optimize/_highs/cython/src/_highs_constants.pyx
    Processing scipy/optimize/_highs/cython/src/_highs_wrapper.pyx
    Processing scipy/optimize/_lsq/givens_elimination.pyx
    Processing scipy/optimize/_trlib/_trlib.pyx
    Processing scipy/optimize/cython_optimize/_zeros.pyx.in
    Processing scipy/signal/_max_len_seq_inner.pyx
    Processing scipy/signal/_peak_finding_utils.pyx
    Processing scipy/signal/_sosfilt.pyx
    Processing scipy/signal/_spectral.pyx
    Processing scipy/signal/_upfirdn_apply.pyx
    Processing scipy/sparse/_csparsetools.pyx.in
    Processing scipy/sparse/csgraph/_flow.pyx
    Processing scipy/sparse/csgraph/_matching.pyx
    Processing scipy/sparse/csgraph/_min_spanning_tree.pyx
    Processing scipy/sparse/csgraph/_reordering.pyx
    Processing scipy/sparse/csgraph/_shortest_path.pyx
    Processing scipy/sparse/csgraph/_tools.pyx
    Processing scipy/sparse/csgraph/_traversal.pyx
    Processing scipy/spatial/_hausdorff.pyx
    Processing scipy/spatial/_voronoi.pyx
    Processing scipy/spatial/ckdtree.pyx
    Processing scipy/spatial/qhull.pyx
    Processing scipy/spatial/transform/rotation.pyx
    Processing scipy/special/_comb.pyx
    Processing scipy/special/_ellip_harm_2.pyx
    Processing scipy/special/_test_round.pyx
    Processing scipy/special/_ufuncs.pyx
    Processing scipy/special/_ufuncs_cxx.pyx
    Processing scipy/special/cython_special.pyx
    Processing scipy/stats/_qmc_cy.pyx
    Processing scipy/stats/_sobol.pyx
    Processing scipy/stats/_stats.pyx
    Processing scipy/stats/biasedurn.pyx
    Processing scipy/stats/_boost/src/beta_ufunc.pyx
    Processing scipy/stats/_boost/src/binom_ufunc.pyx
    Processing scipy/stats/_boost/src/nbinom_ufunc.pyx
    warning: _cython_special_custom.pxi:9:8: Unreachable code
    warning: _cython_special_custom.pxi:13:4: Unreachable code
    warning: _cython_special_custom.pxi:21:8: Unreachable code
    warning: _cython_special_custom.pxi:25:4: Unreachable code
    warning: _cython_special_custom.pxi:33:8: Unreachable code
    warning: _cython_special_custom.pxi:37:4: Unreachable code
    warning: _cython_special_custom.pxi:45:8: Unreachable code
    warning: _cython_special_custom.pxi:49:4: Unreachable code
    Cythonizing sources
    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
    libraries mkl_rt not found in ['/opt/freeware/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
    NOT AVAILABLE

    openblas_lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
    libraries openblas not found in ['/opt/freeware/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
    NOT AVAILABLE

    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
    libraries openblas,lapack not found in ['/opt/freeware/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
    NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
    libraries lapack_atlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries tatlas,tatlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib64
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
    libraries tatlas,tatlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

    atlas_3_10_info:
    customize UnixCCompiler
    libraries lapack_atlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries satlas,satlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib64
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
    libraries satlas,satlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
    libraries lapack_atlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

    atlas_info:
    customize UnixCCompiler
    libraries lapack_atlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /opt/freeware/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib64
    customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib64
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib
    customize UnixCCompiler
    libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

    accelerate_info:
    NOT AVAILABLE

    lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
    FOUND:
    libraries = ['lapack', 'lapack']
    library_dirs = ['/opt/freeware/lib']
    language = f77

    blas_info:
    customize UnixCCompiler
    customize UnixCCompiler
    C compiler: 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

    creating /tmp/tmp3s2j9wh4/tmp
    creating /tmp/tmp3s2j9wh4/tmp/tmp3s2j9wh4
    compile options: '-I/usr/include -I/opt/freeware/include -c'
    gcc: /tmp/tmp3s2j9wh4/source.c
    /tmp/tmp3s2j9wh4/source.c:1:10: fatal error: cblas.h: No such file or directory
    #include <cblas.h>
    ^~~~~~~~~
    compilation terminated.
    customize UnixCCompiler
    FOUND:
    libraries = ['blas', 'blas']
    library_dirs = ['/opt/freeware/lib']
    include_dirs = ['/usr/include', '/opt/freeware/include']

    FOUND:
    define_macros = [('NO_ATLAS_INFO', 1)]
    libraries = ['lapack', 'lapack', 'blas', 'blas']
    library_dirs = ['/opt/freeware/lib']
    language = f77
    include_dirs = ['/usr/include', '/opt/freeware/include']

    setup.py:492: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-_nh9ov7z'), proceeding with generating Cython sources and expanding templates
    ' '.join(sys.argv[1:])))
    Running from SciPy source directory.
    /tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/system_info.py:639: UserWarning:
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
    self.calc_info()
    Traceback (most recent call last):
    File "/opt/freeware/lib64/python3.7/configparser.py", line 788, in get
    value = d[option]
    File "/opt/freeware/lib64/python3.7/collections/__init__.py", line 916, in __getitem__
    return self.__missing__(key) # support subclasses that define __missing__
    File "/opt/freeware/lib64/python3.7/collections/__init__.py", line 908, in __missing__
    raise KeyError(key)
    KeyError: 'defines'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
    main()
    File "/opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 166, in prepare_metadata_for_build_wheel
    self.run_setup()
    File "/tmp/pip-build-env-vffrxafh/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 259, in run_setup
    self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 150, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 629, in <module>
    setup_package()
    File "setup.py", line 625, in setup_package
    setup(**metadata)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/core.py", line 137, in setup
    config = configuration()
    File "setup.py", line 536, in configuration
    config.add_subpackage('scipy')
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/misc_util.py", line 1036, in add_subpackage
    caller_level = 2)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/misc_util.py", line 1005, in get_subpackage
    caller_level = caller_level + 1)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/misc_util.py", line 942, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
    File "scipy/setup.py", line 12, in configuration
    config.add_subpackage('interpolate')
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/misc_util.py", line 1036, in add_subpackage
    caller_level = 2)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/misc_util.py", line 1005, in get_subpackage
    caller_level = caller_level + 1)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib64/python3.7/site-packages/numpy/distutils/misc_util.py", line 942, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
    File "scipy/interpolate/setup.py", line 62, in configuration
    config=['compiler.blas=none']
    File "/tmp/pip-build-env-vffrxafh/overlay/lib/python3.7/site-packages/pythran/dist.py", line 145, in __init__
    cfg_ext = cfg.make_extension(python=True, **kwargs)
    File "/tmp/pip-build-env-vffrxafh/overlay/lib/python3.7/site-packages/pythran/config.py", line 139, in make_extension
    cfg.get('compiler', 'defines').split()],
    File "/opt/freeware/lib64/python3.7/configparser.py", line 791, in get
    raise NoOptionError(option, section)
    configparser.NoOptionError: No option 'defines' in section: 'compiler'
    ----------------------------------------
    ERROR: Command errored out with exit status 1: /opt/freeware/bin/python3 /opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7ph6dypn Check the logs for full command output.
    WARNING: You are using pip version 20.1.1; however, version 21.2.4 is available.
    You should consider upgrading via the '/opt/freeware/bin/python3 -m pip install --upgrade pip' command.

    ------------------------------
    philip miloslavsky
    ------------------------------


  • 2.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Tue October 05, 2021 12:27 PM
    FYI, this is what yum said:
    Running Transaction
    Installing : libgfortran8-8.3.0-6.ppc 1/15
    Installing : 1:libgfortran-8-1.ppc 2/15
    Installing : pkg-config-0.29.2-2.ppc 3/15
    Installing : zlib-devel-1.2.11-2.ppc 4/15
    Installing : blas-3.9.1-1.ppc 5/15
    Installing : gcc8-gfortran-8.3.0-6.ppc 6/15
    Installing : zeromq-4.3.3-1.ppc 7/15
    Installing : python3-3.7.11-1.ppc 8/15
    Installing : python3-devel-3.7.11-1.ppc 9/15
    Installing : zeromq-devel-4.3.3-1.ppc 10/15
    Installing : 1:gcc-gfortran-8-1.ppc 11/15
    Installing : lapack-3.9.1-1.ppc 12/15
    Installing : freetype2-devel-2.10.4-1.ppc 13/15
    Installing : libpng-devel-1.6.27-3.ppc 14/15
    Installing : xz-5.2.5-1.ppc 15/15

    Installed:
    blas.ppc 0:3.9.1-1 freetype2-devel.ppc 0:2.10.4-1 gcc-gfortran.ppc 1:8-1 lapack.ppc 0:3.9.1-1 libpng-devel.ppc 0:1.6.27-3
    python3.ppc 0:3.7.11-1 python3-devel.ppc 0:3.7.11-1 xz.ppc 0:5.2.5-1 zeromq.ppc 0:4.3.3-1 zeromq-devel.ppc 0:4.3.3-1

    Dependency Installed:
    gcc8-gfortran.ppc 0:8.3.0-6 libgfortran.ppc 1:8-1 libgfortran8.ppc 0:8.3.0-6 pkg-config.ppc 0:0.29.2-2
    zlib-devel.ppc 0:1.2.11-2

    Complete!
    p9aixdev4-openxl AIX-powerpc pmilosla$ export PATH=$PATH:/opt/freeware/bin

    ------------------------------
    philip miloslavsky
    ------------------------------



  • 3.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Wed October 06, 2021 01:57 AM

    This is because of pythran. You need to export SCIPY_USE_PYTHRAN=0. 

    AIX support in pythran is recently added ( version 0.9.12 has it). And the development version of scipy has been updated to make use of the new pythran. So in the yet to be released newer version of SciPy , it will work as such. 



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



  • 4.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Wed October 06, 2021 08:53 AM
    Got much farther but still fails:

    p9aixdev4-openxl AIX-powerpc pmilosla$ python3 -m pip install numpy pandas scipy scikit-learn matplotlib flask
    Requirement already satisfied: numpy in /opt/freeware/lib64/python3.7/site-packages (1.21.2)
    Collecting pandas
    Using cached pandas-1.3.3.tar.gz (4.7 MB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
    Collecting scipy
    Using cached scipy-1.7.1.tar.gz (36.1 MB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
    Collecting scikit-learn
    Downloading scikit-learn-1.0.tar.gz (7.8 MB)
    |################################| 7.8 MB 6.8 MB/s
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
    Collecting matplotlib
    Downloading matplotlib-3.4.3.tar.gz (37.9 MB)
    |################################| 37.9 MB 175 kB/s
    Collecting flask
    Downloading Flask-2.0.2-py3-none-any.whl (95 kB)
    |################################| 95 kB 3.6 MB/s
    Collecting pytz>=2017.3
    Downloading pytz-2021.3-py2.py3-none-any.whl (503 kB)
    |################################| 503 kB 9.1 MB/s
    Collecting python-dateutil>=2.7.3
    Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    |################################| 247 kB 11.5 MB/s
    Collecting threadpoolctl>=2.0.0
    Downloading threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
    Collecting joblib>=0.11
    Downloading joblib-1.0.1-py3-none-any.whl (303 kB)
    |################################| 303 kB 11.7 MB/s
    Collecting cycler>=0.10
    Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
    Collecting kiwisolver>=1.0.1
    Downloading kiwisolver-1.3.2.tar.gz (54 kB)
    |################################| 54 kB 2.6 MB/s
    ERROR: Command errored out with exit status 1:
    command: /opt/freeware/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-abt8ykyj/kiwisolver/setup.py'"'"'; __file__='"'"'/tmp/pip-install-abt8ykyj/kiwisolver/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-uceqtsfb
    cwd: /tmp/pip-install-abt8ykyj/kiwisolver/
    Complete output (44 lines):
    WARNING: The wheel package is not available.
    ERROR: Command errored out with exit status 1:
    command: /opt/freeware/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-flc_s3v6/cppy/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-flc_s3v6/cppy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-sgy5r5ha
    cwd: /tmp/pip-wheel-flc_s3v6/cppy/
    Complete output (6 lines):
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: setup.py --help [cmd1 cmd2 ...]
    or: setup.py --help-commands
    or: setup.py cmd --help

    error: invalid command 'bdist_wheel'
    ----------------------------------------
    ERROR: Failed building wheel for cppy
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
    File "/opt/freeware/lib/python3.7/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
    subprocess.check_call(cmd)
    File "/opt/freeware/lib64/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/opt/freeware/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpnqh6do87', '--quiet', 'cppy>=1.1.0']' returned non-zero exit status 1.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-abt8ykyj/kiwisolver/setup.py", line 93, in <module>
    cmdclass={'build_ext': BuildExt},
    File "/opt/freeware/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
    _install_setup_requires(attrs)
    File "/opt/freeware/lib/python3.7/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
    File "/opt/freeware/lib/python3.7/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
    replace_conflicting=True,
    File "/opt/freeware/lib/python3.7/site-packages/pkg_resources/__init__.py", line 783, in resolve
    replace_conflicting=replace_conflicting
    File "/opt/freeware/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1066, in best_match
    return self.obtain(req, installer)
    File "/opt/freeware/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1078, in obtain
    return installer(requirement)
    File "/opt/freeware/lib/python3.7/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
    return fetch_build_egg(self, req)
    File "/opt/freeware/lib/python3.7/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
    raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['/opt/freeware/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpnqh6do87', '--quiet', 'cppy>=1.1.0']' returned non-zero exit status 1.
    ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    WARNING: You are using pip version 20.1.1; however, version 21.2.4 is available.

    ------------------------------
    philip miloslavsky
    ------------------------------



  • 5.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Wed October 06, 2021 09:41 AM
    python3.7 is little older right now. So it comes with a older version of pip & setuptools bundled with it. So it is always recommended to upgrade pip & setuptools before using pip to install any python packages.

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



  • 6.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Wed October 06, 2021 10:15 AM
    The very first time I tried this I upgraded pip with
    python3 -m pip install --upgrade pip
    but that broke the whole install so I had to redo.

    You want me to do that and python3 -m pip install  --upgrade setuptools ?

    Any chance we could MS Teams through this together? Can you send me an email to first.last@intersystems.com?

    ------------------------------
    philip miloslavsky
    ------------------------------



  • 7.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Thu October 07, 2021 04:21 AM
    I don't know what got broke in your system. But upgrading pip & setuptools is the way to go.
    Nowadays it's recommended to use virtual environment to install python packages via pip. So that it won't interfere with system installed packages.

    python3 -m venv myenv
    . ./myenv/bin/activate
    pip install --upgrade pip
    pip install --upgrade setuptools

    By default,  only pip & setuptools will be available inside the virtual env. If we want to make use of other system installed python modules inside virtual environment, then add "--system-site-packages" option while creating the virtual env. 
    python3 -m venv --system-site-packages myenv

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



  • 8.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Wed October 06, 2021 09:15 AM
    Can you also comment on if I will be able to do this:

    https://github.com/ageron/handson-ml2/blob/master/INSTALL.md

    It talks about anaconda, but maybe I don't need that. But we also have tensorflow and GPU drivers which of-course my LPAR doesn't have.

    Whats the general state of things like BLAS and tensorflow in terms of taking advantage of P8,P9, and P10 architecture?

    ------------------------------
    philip miloslavsky
    ------------------------------



  • 9.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Mon December 06, 2021 11:20 AM
    I'm using the same document to add Pandas, but rather than fail on scipy, it's failing on NumPy.  I've run through the recommended updates to pip and setuptools but still encountering errors:
    python3 -m pip install numpy
    Collecting numpy
    Using cached numpy-1.21.4.zip (10.6 MB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: numpy
    Building wheel for numpy (pyproject.toml) ... 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/_in_process.py build_wheel /tmp/tmpgjpep_dh
    cwd: /tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53
    Complete output (236 lines):
    Processing numpy/random/_bounded_integers.pxd.in
    Processing numpy/random/_bounded_integers.pyx.in
    Processing numpy/random/_common.pyx
    Processing numpy/random/_generator.pyx
    Processing numpy/random/_mt19937.pyx
    Processing numpy/random/_pcg64.pyx
    Processing numpy/random/_philox.pyx
    Processing numpy/random/_sfc64.pyx
    Processing numpy/random/bit_generator.pyx
    Processing numpy/random/mtrand.pyx
    Cythonizing sources
    blas_opt_info:
    blas_mkl_info:
    customize UnixCCompiler
    libraries mkl_rt not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    blis_info:
    libraries blis not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    openblas_info:
    libraries openblas not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    accelerate_info:
    NOT AVAILABLE

    atlas_3_10_blas_threads_info:
    Setting PTATLAS=ATLAS
    libraries tatlas not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    atlas_3_10_blas_info:
    libraries satlas not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
    libraries ptf77blas,ptcblas,atlas not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    atlas_blas_info:
    libraries f77blas,cblas,atlas not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    blas_info:
    C compiler: 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

    creating /tmp/tmp_mglb7p3/tmp
    creating /tmp/tmp_mglb7p3/tmp/tmp_mglb7p3
    compile options: '-I/usr/bin/../../opt/freeware/include -c'
    gcc: /tmp/tmp_mglb7p3/source.c
    exec(): 0509-036 Cannot load program gcc because of the following errors:
    0509-130 Symbol resolution failed for gcc-8 because:
    0509-136 Symbol _GLOBAL__AIXI_libiconv_so (number 173) is not exported from
    dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2).
    0509-136 Symbol _GLOBAL__AIXD_libiconv_so (number 174) is not exported from
    dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2).
    0509-192 Examine .loader section symbols with the
    'dump -Tv' command.
    FOUND:
    libraries = ['blas', 'blas']
    library_dirs = ['/usr/bin/../../opt/freeware/lib']
    include_dirs = ['/usr/bin/../../opt/freeware/include']

    FOUND:
    define_macros = [('NO_ATLAS_INFO', 1)]
    libraries = ['blas', 'blas']
    library_dirs = ['/usr/bin/../../opt/freeware/lib']
    include_dirs = ['/usr/bin/../../opt/freeware/include']

    non-existing path in 'numpy/distutils': 'site.cfg'
    lapack_opt_info:
    lapack_mkl_info:
    libraries mkl_rt not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    openblas_lapack_info:
    libraries openblas not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    openblas_clapack_info:
    libraries openblas,lapack not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    flame_info:
    libraries flame not found in ['/usr/bin/../../opt/freeware/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in /usr/bin/../../opt/freeware/lib
    libraries tatlas,tatlas not found in /usr/bin/../../opt/freeware/lib
    libraries lapack_atlas not found in /usr/lib64
    libraries tatlas,tatlas not found in /usr/lib64
    libraries lapack_atlas not found in /usr/lib
    libraries tatlas,tatlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

    atlas_3_10_info:
    libraries lapack_atlas not found in /usr/bin/../../opt/freeware/lib
    libraries satlas,satlas not found in /usr/bin/../../opt/freeware/lib
    libraries lapack_atlas not found in /usr/lib64
    libraries satlas,satlas not found in /usr/lib64
    libraries lapack_atlas not found in /usr/lib
    libraries satlas,satlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in /usr/bin/../../opt/freeware/lib
    libraries ptf77blas,ptcblas,atlas not found in /usr/bin/../../opt/freeware/lib
    libraries lapack_atlas not found in /usr/lib64
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib64
    libraries lapack_atlas not found in /usr/lib
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

    atlas_info:
    libraries lapack_atlas not found in /usr/bin/../../opt/freeware/lib
    libraries f77blas,cblas,atlas not found in /usr/bin/../../opt/freeware/lib
    libraries lapack_atlas not found in /usr/lib64
    libraries f77blas,cblas,atlas not found in /usr/lib64
    libraries lapack_atlas not found in /usr/lib
    libraries f77blas,cblas,atlas not found in /usr/lib
    <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

    lapack_info:
    FOUND:
    libraries = ['lapack', 'lapack']
    library_dirs = ['/usr/bin/../../opt/freeware/lib']
    language = f77

    FOUND:
    libraries = ['lapack', 'lapack', 'blas', 'blas']
    library_dirs = ['/usr/bin/../../opt/freeware/lib']
    language = f77
    define_macros = [('NO_ATLAS_INFO', 1)]
    include_dirs = ['/usr/bin/../../opt/freeware/include']

    running bdist_wheel
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building py_modules sources
    creating build
    creating build/src.aix-7.1-3.7
    creating build/src.aix-7.1-3.7/numpy
    creating build/src.aix-7.1-3.7/numpy/distutils
    building library "npymath" sources
    Could not locate executable xlf90
    Could not locate executable xlf
    Could not locate executable g77
    Could not locate executable f77
    don't know how to compile Fortran code on platform 'posix'
    exec(): 0509-036 Cannot load program gcc because of the following errors:
    0509-130 Symbol resolution failed for gcc-8 because:
    0509-136 Symbol _GLOBAL__AIXI_libiconv_so (number 173) is not exported from
    dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2).
    0509-136 Symbol _GLOBAL__AIXD_libiconv_so (number 174) is not exported from
    dependent module /opt/freeware/lib/libiconv.a(libiconv.so.2).
    0509-192 Examine .loader section symbols with the
    'dump -Tv' command.
    Running from numpy source directory.
    /tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/system_info.py:2026: UserWarning:
    Optimized (vendor) Blas libraries are not found.
    Falls back to netlib Blas library which has worse performance.
    A better performance should be easily gained by switching
    Blas library.
    if self._calc_info(blas):
    Warning: attempted relative import with no known parent package
    /opt/freeware/lib64/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
    Traceback (most recent call last):
    File "/opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
    main()
    File "/opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/opt/freeware/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 262, in build_wheel
    metadata_directory)
    File "/tmp/pip-build-env-fcwqkxwi/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 212, in build_wheel
    wheel_directory, config_settings)
    File "/tmp/pip-build-env-fcwqkxwi/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 197, in _build_with_temp_dir
    self.run_setup()
    File "/tmp/pip-build-env-fcwqkxwi/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 249, in run_setup
    self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-fcwqkxwi/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 448, in <module>
    setup_package()
    File "setup.py", line 440, in setup_package
    setup(**metadata)
    File "/tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
    File "/tmp/pip-build-env-fcwqkxwi/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
    File "/opt/freeware/lib64/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
    File "/opt/freeware/lib64/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
    File "/opt/freeware/lib64/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/tmp/pip-build-env-fcwqkxwi/overlay/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
    self.run_command('build')
    File "/opt/freeware/lib64/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "/opt/freeware/lib64/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/command/build.py", line 61, in run
    old_build.run(self)
    File "/opt/freeware/lib64/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
    File "/opt/freeware/lib64/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
    File "/opt/freeware/lib64/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
    File "/tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/command/build_src.py", line 144, in run
    self.build_sources()
    File "/tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/command/build_src.py", line 155, in build_sources
    self.build_library_sources(*libname_info)
    File "/tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/command/build_src.py", line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
    File "/tmp/pip-install-0bzs4a2i/numpy_19d31d65c79f4550b7aac50ba05e9d53/numpy/distutils/command/build_src.py", line 378, in generate_sources
    source = func(extension, build_dir)
    File "numpy/core/setup.py", line 666, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
    RuntimeError: Broken toolchain: cannot link a simple C program
    ----------------------------------------
    ERROR: Failed building wheel for numpy
    Failed to build numpy
    ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

    Any suggestions are welcome.

    ------------------------------
    Thomas Crucian
    ------------------------------



  • 10.  RE: scipy doesnt install on AIX 7.1 or 7.2

    Posted Mon December 06, 2021 04:04 PM
    After additional research, I determined I was running an older libiconv package.  I updated libiconv using yum.  Now I'm encountering a a different error. I will take that to a different thread if I am unable to resolve.

    ------------------------------
    Thomas Crucian
    ------------------------------