linux - loongnix loongarch install numpy: 1.25.2, scipy: 1.11.4 1.12.0

访问量: 43

refer to: https://zhuanlan.zhihu.com/p/452941619

numpy

loongnix: GCC 8.3.0

numpy 2.x, 1.26.x :  GCC 8.4.0+

numpy support loongnix: 1.22.x

so, we can only install 1.22.x ~ 1.25.x 

I choose 1.25.2, 

scipy:  add --no-deps

1.11.4 , 1.12.x

1.13.1 > GCC 8.4

scipy versions:

ERROR: Ignored the following yanked versions: 1.11.0, 1.14.0rc1
ERROR: Could not find a version that satisfies the requirement scipy==1.12.1 (from versions: 0.8.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.6.0, 1.6.1, 1.7.2, 1.7.3, 1.8.0rc1, 1.8.0rc2, 1.8.0rc3, 1.8.0rc4, 1.8.0, 1.8.1, 1.9.0rc1, 1.9.0rc2, 1.9.0rc3, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0rc1, 1.10.0rc2, 1.10.0, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.13.0rc1, 1.13.0, 1.13.1, 1.14.0rc2, 1.14.0, 1.14.1, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2)

apt install gfortran-8

apt install python3-dev libopenblas-dev liblapack-dev pkg-config  libopenblas-dev

root@fd45416264c3:/opt/app/qwen_agent# pip install scipy==1.9.3
Collecting scipy==1.9.3
  Downloading scipy-1.9.3.tar.gz (42.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 MB 319.7 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      + meson setup /tmp/pip-install-wtea8c9_/scipy_0ff2ad8133b74abd88a71119de688e5a /tmp/pip-install-wtea8c9_/scipy_0ff2ad8133b74abd88a71119de688e5a/.mesonpy-dqkzpjx6 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-wtea8c9_/scipy_0ff2ad8133b74abd88a71119de688e5a/.mesonpy-dqkzpjx6/meson-python-native-file.ini
      The Meson build system
      Version: 1.7.0
      Source dir: /tmp/pip-install-wtea8c9_/scipy_0ff2ad8133b74abd88a71119de688e5a
      Build dir: /tmp/pip-install-wtea8c9_/scipy_0ff2ad8133b74abd88a71119de688e5a/.mesonpy-dqkzpjx6
      Build type: native build
      Project name: SciPy
      Project version: 1.9.3
      C compiler for the host machine: cc (gcc 8.3.0 "cc (Loongnix 8.3.0-6.lnd.vec.42) 8.3.0")
      C linker for the host machine: cc ld.bfd 2.31.1-system
      C++ compiler for the host machine: c++ (gcc 8.3.0 "c++ (Loongnix 8.3.0-6.lnd.vec.42) 8.3.0")
      C++ linker for the host machine: c++ ld.bfd 2.31.1-system
      Host machine cpu family: loongarch64
      Host machine cpu: loongarch64
      Compiler for C supports arguments -Wno-unused-but-set-variable: YES
      Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
      Compiler for C supports arguments -Wno-unused-function: YES
      Compiler for C supports arguments -Wno-conversion: YES
      Compiler for C supports arguments -Wno-misleading-indentation: YES
      Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
      Library m found: YES
      
      ../meson.build:57:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang-new'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]
      The following exception(s) were encountered:
      Running `gfortran --help` gave "[Errno 2] No such file or directory: 'gfortran'"
      Running `gfortran --version` gave "[Errno 2] No such file or directory: 'gfortran'"
      Running `gfortran -V` gave "[Errno 2] No such file or directory: 'gfortran'"
      Running `flang-new --help` gave "[Errno 2] No such file or directory: 'flang-new'"
      Running `flang-new --version` gave "[Errno 2] No such file or directory: 'flang-new'"
      Running `flang-new -V` gave "[Errno 2] No such file or directory: 'flang-new'"
      Running `flang --help` gave "[Errno 2] No such file or directory: 'flang'"
      Running `flang --version` gave "[Errno 2] No such file or directory: 'flang'"
      Running `flang -V` gave "[Errno 2] No such file or directory: 'flang'"
      Running `nvfortran --help` gave "[Errno 2] No such file or directory: 'nvfortran'"
      Running `nvfortran --version` gave "[Errno 2] No such file or directory: 'nvfortran'"
      Running `nvfortran -V` gave "[Errno 2] No such file or directory: 'nvfortran'"
      Running `pgfortran --help` gave "[Errno 2] No such file or directory: 'pgfortran'"
      Running `pgfortran --version` gave "[Errno 2] No such file or directory: 'pgfortran'"
      Running `pgfortran -V` gave "[Errno 2] No such file or directory: 'pgfortran'"
      Running `ifort --help` gave "[Errno 2] No such file or directory: 'ifort'"
      Running `ifort --version` gave "[Errno 2] No such file or directory: 'ifort'"
      Running `ifort -V` gave "[Errno 2] No such file or directory: 'ifort'"
      Running `ifx --help` gave "[Errno 2] No such file or directory: 'ifx'"
      Running `ifx --version` gave "[Errno 2] No such file or directory: 'ifx'"
      Running `ifx -V` gave "[Errno 2] No such file or directory: 'ifx'"
      Running `g95 --help` gave "[Errno 2] No such file or directory: 'g95'"
      Running `g95 --version` gave "[Errno 2] No such file or directory: 'g95'"
      Running `g95 -V` gave "[Errno 2] No such file or directory: 'g95'"
      
      A full log can be found at /tmp/pip-install-wtea8c9_/scipy_0ff2ad8133b74abd88a71119de688e5a/.mesonpy-dqkzpjx6/meson-logs/meson-log.txt
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

cp /usr/bin/gfortran-8 /usr/bin/gfortran

订阅/RSS Feed

Subscribe