简体   繁体   中英

cannot install Scipy

Recently I downgraded python to 3.8.10 and tried installing Scipy via

pip install scipy

however I got the following error when installing

Collecting scipy
  Using cached scipy-1.9.0.tar.gz (42.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [59 lines of output]
      The Meson build system
      Version: 0.62.2
      Source dir: /private/var/folders/bx/vdgm2zkx2j7fqj46zmzpjb5m0000gn/T/pip-install-_kkmn0_7/scipy_92d3740ad75646b288e51f8384185474
      Build dir: /private/var/folders/bx/vdgm2zkx2j7fqj46zmzpjb5m0000gn/T/pip-install-_kkmn0_7/scipy_92d3740ad75646b288e51f8384185474/.mesonpy-x1k_nf2i/build
      Build type: native build
      Project name: SciPy
      Project version: 1.9.0
      C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
      C linker for the host machine: cc ld64 650.9
      C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
      C++ linker for the host machine: c++ ld64 650.9
      Host machine cpu family: aarch64
      Host machine cpu: arm64
      Compiler for C supports arguments -Wno-unused-but-set-variable: NO
      Library m found: YES
      Fortran compiler for the host machine: gfortran (gcc 11.2.0 "GNU Fortran (Homebrew GCC 11.3.0) 11.2.0")
      Fortran linker for the host machine: gfortran ld64 650.9
      Program cython found: YES (/private/var/folders/bx/vdgm2zkx2j7fqj46zmzpjb5m0000gn/T/pip-build-env-zpj7_2dm/overlay/bin/cython)
      Program pythran found: YES (/private/var/folders/bx/vdgm2zkx2j7fqj46zmzpjb5m0000gn/T/pip-build-env-zpj7_2dm/overlay/bin/pythran)
      Program cp found: YES (/bin/cp)
      Program python3 found: YES (/Users /.pyenv/versions/3.8.10/bin/python)
      Found pkg-config: /opt/homebrew/bin/pkg-config (0.29.2)
      Library npymath found: YES
      Library npyrandom found: YES
      Found CMake: /opt/homebrew/bin/cmake (3.22.3)
      Run-time dependency openblas found: NO (tried pkgconfig, framework and cmake)

      ../../scipy/meson.build:120:0: ERROR: Dependency "openblas" not found, tried pkgconfig, framework and cmake


  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

....................................................................................

Can someone explain to me what it means? or what I need to do.

If you really want to build scipy from source, you need to install dependencies, see the docs on this: http://scipy.github.io/devdocs/dev/contributor/building.html

However you are most likely better off using prebuilt binaries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM