Revolucion for Monica
Revolucion for Monica

Reputation: 3296

ERROR: Dependency lookup for OpenBLAS with method 'pkgconfig' failed. Can't find cmake even if I installed it

I have tried to install scipy of a project in a conda env and then in a pip env but scipy==1.7.0 gives me an error.

I don't understand why it is doing that:

  Collecting scipy>=0.19.1
    Using cached scipy-1.10.1.tar.gz (42.4 MB)

Because in the requirements I have: scipy==1.7.0.

Then we have:

        Project name: SciPy
        Project version: 1.10.1

I don't understand. Here are the logs anyway:

(venvssast) remplacement@remplacements-MacBook-Pro ssast % pip install -r requirements.txt 

Collecting llvmlite==0.39.0 (from -r requirements.txt (line 2))
  Using cached llvmlite-0.39.0-cp38-cp38-macosx_11_0_arm64.whl (23.1 MB)
Collecting matplotlib==3.4.2 (from -r requirements.txt (line 3))
  Using cached matplotlib-3.4.2.tar.gz (37.3 MB)
  Preparing metadata (setup.py) ... done
Collecting numba==0.53.1 (from -r requirements.txt (line 4))
  Using cached numba-0.53.1.tar.gz (2.2 MB)
  Preparing metadata (setup.py) ... done
Collecting numpy==1.20.3 (from -r requirements.txt (line 5))
  Using cached numpy-1.20.3.zip (7.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting scikit-learn==0.24.2 (from -r requirements.txt (line 6))
  Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [87 lines of output]
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation == "CPython"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "CPython"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_system == "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_system == "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine == "aarch64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine == "aarch64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.8" and platform_machine == "aarch64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_system != "AIX"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.9"' don't match your environment
      Collecting setuptools
        Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/bb/26/7945080113158354380a12ce26873dd6c1ebd88d47f5bc24e2c5bb38c16a/setuptools-68.2.2-py3-none-any.whl.metadata
        Using cached setuptools-68.2.2-py3-none-any.whl.metadata (6.3 kB)
      Collecting wheel
        Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl.metadata
        Using cached wheel-0.41.2-py3-none-any.whl.metadata (2.2 kB)
      Collecting Cython>=0.28.5
        Obtaining dependency information for Cython>=0.28.5 from https://files.pythonhosted.org/packages/a5/70/11e973497f9f635654ef1fefffd0573f83813a65cd9221215f08192fb531/Cython-3.0.3-py2.py3-none-any.whl.metadata
        Using cached Cython-3.0.3-py2.py3-none-any.whl.metadata (3.2 kB)
      Collecting numpy==1.17.3
        Using cached numpy-1.17.3.zip (6.4 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting scipy>=0.19.1
        Using cached scipy-1.10.1.tar.gz (42.4 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [42 lines of output]
            The Meson build system
            Version: 1.2.2
            Source dir: /private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-install-8lx62wf5/scipy_15901069da9d412a8784bc6f3d4d0c46
            Build dir: /private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-install-8lx62wf5/scipy_15901069da9d412a8784bc6f3d4d0c46/.mesonpy-fk1h3pne/build
            Build type: native build
            Project name: SciPy
            Project version: 1.10.1
            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
            Cython compiler for the host machine: cython (cython 0.29.36)
            Host machine cpu family: aarch64
            Host machine cpu: aarch64
            Compiler for C supports arguments -Wno-unused-but-set-variable: NO
            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
            Fortran compiler for the host machine: gfortran (gcc 13.2.0 "GNU Fortran (Homebrew GCC 13.2.0) 13.2.0")
            Fortran linker for the host machine: gfortran ld64 530
            Compiler for Fortran supports arguments -Wno-conversion: YES
            Checking if "-Wl,--version-script" : links: NO
            Program cython found: YES (/private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-build-env-qoy2gy1f/overlay/bin/cython)
            Program python found: YES (/Users/remplacement/anaconda3/envs/venvssast/bin/python)
            Did not find pkg-config by name 'pkg-config'
            Found Pkg-config: NO
            Run-time dependency python found: YES 3.8
            Program pythran found: YES (/private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-build-env-qoy2gy1f/overlay/bin/pythran)
            Run-time dependency threads found: YES
            Library npymath found: YES
            Library npyrandom found: YES
            Did not find CMake 'cmake'
            Found CMake: NO
            Run-time dependency openblas found: NO (tried pkgconfig, framework and cmake)
            Run-time dependency openblas found: NO (tried framework)
      
            ../../scipy/meson.build:134:7: ERROR: Dependency lookup for OpenBLAS with method 'pkgconfig' failed: Pkg-config binary for machine 1 not found. Giving up.
      
            A full log can be found at /private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-install-8lx62wf5/scipy_15901069da9d412a8784bc6f3d4d0c46/.mesonpy-fk1h3pne/build/meson-logs/meson-log.txt
            + meson setup --prefix=/Users/remplacement/anaconda3/envs/venvssast /private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-install-8lx62wf5/scipy_15901069da9d412a8784bc6f3d4d0c46 /private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-install-8lx62wf5/scipy_15901069da9d412a8784bc6f3d4d0c46/.mesonpy-fk1h3pne/build --native-file=/private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-install-8lx62wf5/scipy_15901069da9d412a8784bc6f3d4d0c46/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
            [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.
      hint: See above for details.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies 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.

I should point out that I have installed cython and pythran for myself. I then tried to install cmake:

(venvssast) remplacement@remplacements-MacBook-Pro ssast % cmake --version
cmake version 3.27.6

CMake suite maintained and supported by Kitware (kitware.com/cmake).

But it is still not able to find it:

  ...
  Program python found: YES (/Users/remplacement/anaconda3/envs/venvssast/bin/python)
  Did not find pkg-config by name 'pkg-config'
  Found Pkg-config: NO
  Run-time dependency python found: YES 3.8
  Program pythran found: YES (/private/var/folders/9y/n84kv4sd3g3g957m35d_p3z40000gn/T/pip-build-env-n410ewyd/overlay/bin/pythran)
  Run-time dependency threads found: YES
  Library npymath found: YES
  Library npyrandom found: YES
  Did not find CMake 'cmake'
  Found CMake: NO

Here are the requirements:

requirements.txt

llvmlite==0.39.0
matplotlib==3.4.2
numba==0.53.1
numpy==1.20.3
scikit-learn==0.24.2
scipy==1.7.0
sklearn==0.0
timm==0.4.5
torch==1.9.0
torchaudio==0.9.0
wget==3.2
zipp==3.4.1

Upvotes: 0

Views: 729

Answers (0)

Related Questions