ubuntu 에서 pip 설치 중 오류 발생 시 해결

첫 번째 pip 에러

pip 설치 중에 아래와 같은 오류가 생겼다.

error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      + meson setup /tmp/pip-install-zpifljzl/scs_2e4b4ae599744b65a73ffc1b888cd36b /tmp/pip-install-zpifljzl/scs_2e4b4ae599744b65a73ffc1b888cd36b/.mesonpy-xihrwswg -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-zpifljzl/scs_2e4b4ae599744b65a73ffc1b888cd36b/.mesonpy-xihrwswg/meson-python-native-file.ini
      The Meson build system
      Version: 1.3.1
      Source dir: /tmp/pip-install-zpifljzl/scs_2e4b4ae599744b65a73ffc1b888cd36b
      Build dir: /tmp/pip-install-zpifljzl/scs_2e4b4ae599744b65a73ffc1b888cd36b/.mesonpy-xihrwswg
      Build type: native build
      Project name: scs
      Project version: undefined
      C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
      C linker for the host machine: cc ld.bfd 2.38
      Host machine cpu family: aarch64
      Host machine cpu: aarch64
      Program python found: YES (/opt/conda/bin/python3.11)
      Library openblas found: NO
      Did not find pkg-config by name 'pkg-config'
      Found pkg-config: NO
      Did not find CMake 'cmake'
      Found CMake: NO
      Run-time dependency openblas found: NO (tried pkgconfig and cmake)
      Run-time dependency openblas found: NO (tried pkgconfig and cmake)
      Library blas found: NO
      Run-time dependency blas found: NO (tried pkgconfig and cmake)
      Library lapack found: NO
      Run-time dependency lapack found: NO (tried pkgconfig and cmake)
      Library cblas found: NO
      Run-time dependency cblas found: NO (tried pkgconfig and cmake)

      ../meson.build:49:4: ERROR: Problem encountered: OpenBLAS or Netlib BLAS/CBLAS is required on all platforms except Windows, and was not found.

      A full log can be found at /tmp/pip-install-zpifljzl/scs_2e4b4ae599744b65a73ffc1b888cd36b/.mesonpy-xihrwswg/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.
hint: See above for details.

첫 번째 pip 설치 오류 해결 방법

ubuntu 에서 위와 같은 오류가 발생될 경우 sudo apt-get install libopenblas-dev 명령어를 실행해서 패키지를 설치해 준 뒤에
pip 설치 명령어를 재실행해보면 해결될 수 있다.

두 번째 pip 설치 에러

  error: subprocess-exited-with-error

  × Building wheel for qdldl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [72 lines of output]
      running bdist_wheel
      running build
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 81, in build_extensions
        File "/opt/conda/lib/python3.11/subprocess.py", line 466, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/conda/lib/python3.11/subprocess.py", line 548, in run
          with Popen(*popenargs, **kwargs) as process:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/conda/lib/python3.11/subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/opt/conda/lib/python3.11/subprocess.py", line 1950, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'cmake'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/opt/conda/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/conda/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/conda/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 404, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 389, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 113, in <module>
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-99_zleh4/normal/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-99_zleh4/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "<string>", line 83, in build_extensions
      RuntimeError: CMake must be installed to build qdldl
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for qdldl
Failed to build qdldl
ERROR: Could not build wheels for qdldl, which is required to install pyproject.toml-based projects

두 번재 pip 설치 오류 해결 방법

sudo apt install cmake 명령어로 cmake를 설치해준 후에 pip를 설치하면 해결된다.

Leave a Comment

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.