尝试在Android Termux Python 3.10上编译Scipy

bzzcjhmw  于 2022-11-10  发布在  Android
关注(0)|答案(1)|浏览(154)

我对 Termux 的滚动发布深感沮丧,而没有考虑以前的python版本和模块
现在我正在编译最新版本的 Scipy,但在此之前我正在运行

export BLAS=/data/data/com.termux/files/usr/lib/libblas.so
export LAPACK=/data/data/com.termux/files/usr/lib/liblapack.so
export CC=clang
export CPP=clang++
python runtests.py -v

https://scipy.github.io/devdocs/dev/contributor/runtests.html
我通过 pip 安装了一些缺失的软件包。以下是输出& I need help here

Building, see build.log...
    ... build in progress (0:01:00.279236 elapsed)
Running from SciPy source directory.
scipy/linalg/_generate_pyx.py: all files up-to-date
scipy/special/_generate_pyx.py: all files up-to-date
Running scipy/linalg/_generate_pyx.py
Running scipy/special/_generate_pyx.py
Running scipy/stats/_generate_pyx.py
scipy/_lib/_ccallback_c.pyx has not changed
scipy/_lib/_test_deprecation_call.pyx has not changed
scipy/_lib/messagestream.pyx has not changed
scipy/cluster/_hierarchy.pyx has not changed
scipy/_lib/_test_deprecation_def.pyx has not changed
scipy/cluster/_vq.pyx has not changed
scipy/fftpack/convolve.pyx has not changed
scipy/interpolate/_bspl.pyx has not changed
scipy/cluster/_optimal_leaf_ordering.pyx has not changed
scipy/interpolate/_ppoly.pyx has not changed
scipy/interpolate/interpnd.pyx has not changed
scipy/io/matlab/_mio5_utils.pyx has not changed
scipy/io/matlab/_mio_utils.pyx has not changed
scipy/io/matlab/_streams.pyx has not changed
scipy/linalg/_cythonized_array_utils.pyx has not changed
scipy/linalg/_decomp_update.pyx.in has not changed
scipy/linalg/_matfuncs_expm.pyx.in has not changed
scipy/linalg/_matfuncs_sqrtm_triu.pyx has not changed
scipy/linalg/cython_blas.pyx has not changed
scipy/linalg/_solve_toeplitz.pyx has not changed
scipy/linalg/cython_lapack.pyx has not changed
scipy/ndimage/src/_cytest.pyx has not changed
scipy/ndimage/src/_ni_label.pyx has not changed
scipy/optimize/_bglu_dense.pyx has not changed
scipy/optimize/_group_columns.pyx has not changed
scipy/optimize/_highs/cython/src/_highs_constants.pyx has not changed
scipy/optimize/_highs/cython/src/_highs_wrapper.pyx has not changed
scipy/optimize/_lsq/givens_elimination.pyx has not changed
scipy/optimize/_trlib/_trlib.pyx has not changed
scipy/optimize/cython_optimize/_zeros.pyx.in has not changed
scipy/optimize/tnc/_moduleTNC.pyx has not changed
scipy/signal/_max_len_seq_inner.pyx has not changed
scipy/signal/_peak_finding_utils.pyx has not changed
scipy/signal/_sosfilt.pyx has not changed
scipy/signal/_spectral.pyx has not changed
scipy/signal/_upfirdn_apply.pyx has not changed
scipy/sparse/_csparsetools.pyx.in has not changed
scipy/sparse/csgraph/_flow.pyx has not changed
scipy/sparse/csgraph/_matching.pyx has not changed
scipy/sparse/csgraph/_min_spanning_tree.pyx has not changed
scipy/sparse/csgraph/_reordering.pyx has not changed
scipy/sparse/csgraph/_shortest_path.pyx has not changed
scipy/sparse/csgraph/_tools.pyx has not changed
scipy/sparse/csgraph/_traversal.pyx has not changed
scipy/spatial/_ckdtree.pyx has not changed
scipy/spatial/_hausdorff.pyx has not changed
scipy/spatial/_qhull.pyx has not changed
scipy/spatial/_voronoi.pyx has not changed
scipy/spatial/transform/_rotation.pyx has not changed
scipy/special/_comb.pyx has not changed
scipy/special/_ellip_harm_2.pyx has not changed
scipy/special/_test_round.pyx has not changed
scipy/special/_ufuncs.pyx has not changed
scipy/special/_ufuncs_cxx.pyx has not changed
scipy/special/cython_special.pyx has not changed
scipy/stats/_qmc_cy.pyx has not changed
scipy/stats/_sobol.pyx has not changed
scipy/stats/_biasedurn.pyx has not changed
scipy/stats/_stats.pyx has not changed
scipy/stats/_boost/src/beta_ufunc.pyx has not changed
scipy/stats/_boost/src/nbinom_ufunc.pyx has not changed
scipy/stats/_boost/src/binom_ufunc.pyx has not changed
scipy/stats/_boost/src/hypergeom_ufunc.pyx has not changed
scipy/stats/_boost/src/ncf_ufunc.pyx has not changed
scipy/stats/_levy_stable/levyst.pyx has not changed
scipy/stats/_unuran/unuran_wrapper.pyx has not changed
/data/data/com.termux/files/usr/lib/python3.10/site-packages/setuptools/config/pyprojecttoml.py:102: _ExperimentalProjectMetadata: Support for project metadata in `pyproject.toml` is still experimental and may be removed (or change) in future releases.
  warnings.warn(msg, _ExperimentalProjectMetadata)
Cythonizing sources
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: customize UnixCCompiler
INFO:   libraries armpl_lp64_mp not found in ['/data/data/com.termux/files/usr/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO:   libraries mkl_rt not found in ['/data/data/com.termux/files/usr/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO: C compiler: clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -fPIC

creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data
creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data
creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data/com.termux
creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data/com.termux/files
creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data/com.termux/files/usr
creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data/com.termux/files/usr/tmp
creating /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data/com.termux/files/usr/tmp/tmpw9i7rrqz
INFO: compile options: '-c'
INFO: clang: /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/source.c
INFO: clang /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/source.o -L/data/data/com.termux/files/usr/lib -lopenblas -o /data/data/com.termux/files/usr/tmp/tmpw9i7rrqz/a.out
INFO:   FOUND:
INFO:     libraries = ['openblas', 'openblas']
INFO:     library_dirs = ['/data/data/com.termux/files/usr/lib']
INFO:     language = c
INFO:     define_macros = [('HAVE_CBLAS', None)]
INFO:
INFO:   FOUND:
INFO:     libraries = ['openblas', 'openblas']
INFO:     library_dirs = ['/data/data/com.termux/files/usr/lib']
INFO:     language = c
INFO:     define_macros = [('HAVE_CBLAS', None)]
INFO:
non-existing path in 'scipy/linalg': 'src/lapack_deprecations/LICENSE'
INFO: blas_opt_info:
INFO: blas_armpl_info:
INFO:   libraries armpl_lp64_mp not found in ['/data/data/com.termux/files/usr/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: blas_mkl_info:
INFO:   libraries mkl_rt not found in ['/data/data/com.termux/files/usr/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: blis_info:
INFO:   libraries blis not found in ['/data/data/com.termux/files/usr/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: openblas_info:
INFO: C compiler: clang -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mthumb -fstack-protector-strong -O3 -fPIC

creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data
creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data
creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data/com.termux
creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data/com.termux/files
creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data/com.termux/files/usr
creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data/com.termux/files/usr/tmp
creating /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data/com.termux/files/usr/tmp/tmp0139l74e
INFO: compile options: '-c'
INFO: clang: /data/data/com.termux/files/usr/tmp/tmp0139l74e/source.c
INFO: clang /data/data/com.termux/files/usr/tmp/tmp0139l74e/data/data/com.termux/files/usr/tmp/tmp0139l74e/source.o -L/data/data/com.termux/files/usr/lib -lopenblas -o /data/data/com.termux/files/usr/tmp/tmp0139l74e/a.out
INFO:   FOUND:
INFO:     libraries = ['openblas', 'openblas']
INFO:     library_dirs = ['/data/data/com.termux/files/usr/lib']
INFO:     language = c
INFO:     define_macros = [('HAVE_CBLAS', None)]
INFO:
INFO:   FOUND:
INFO:     libraries = ['openblas', 'openblas']
INFO:     library_dirs = ['/data/data/com.termux/files/usr/lib']
INFO:     language = c
INFO:     define_macros = [('HAVE_CBLAS', None)]
INFO:
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/setup.py", line 532, in <module>
    setup_package()
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/setup.py", line 528, in setup_package
    setup(**metadata)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
    config = configuration()
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/setup.py", line 438, in configuration
    config.add_subpackage('scipy')
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1054, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1020, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 962, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/scipy/setup.py", line 18, in configuration
    config.add_subpackage('optimize')
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1054, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1020, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 962, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/scipy/optimize/setup.py", line 130, in configuration
    config.add_subpackage('_highs')
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1054, in add_subpackage
    config_list = self.get_subpackage(subpackage_name, subpackage_path,
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 1020, in get_subpackage
    config = self._get_configuration_from_setup_py(
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/numpy/distutils/misc_util.py", line 962, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/scipy/optimize/_highs/setup.py", line 63, in configuration
    _major_dot_minor = _get_version(
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/scipy/optimize/_highs/setup.py", line 50, in _get_version
    with open(CMakeLists, 'r', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/data/data/com.termux/files/usr/lib/python3.10/site-packages/scipy/scipy/_lib/highs/CMakeLists.txt'

Build failed! (0:01:17.306152 elapsed)
ruyhziif

ruyhziif1#

我假设您需要的是在Termux中运行的Scipy的最新版本。

我想你是在给自己找麻烦。我只使用了Termux就成功地为python 3. 10. 4编译并安装了scipy 1. 8. 1。
首先,在安装之前去掉所有的导出。作为一个附带说明,如果没有设置CC env.变量,pip将默认使用aarch64-linux-android-clang
您也不需要libblas.soliblapack.so,编译Scipy时确实需要BLAS/LAPACK库,但您可以通过pkg in openblas简单地获得它们。
一旦完成,一个简单的pip install scipy对我来说就像一个魅力(我花了15分钟以上的时间来构建它,所以要有耐心)。
希望对您有所帮助^^

相关问题