【问题标题】:I'm having trouble downloading the slycot library using terminal via pip我无法通过 pip 使用终端下载 slycot 库
【发布时间】:2020-02-22 20:26:27
【问题描述】:

所以我尝试通过 pip 下载 slycot,但我不断收到错误消息。老实说,我并不完全熟悉终端提示以及它是如何工作的。这是我跑步时得到的结果,sudo -H pip3 install slycot

这是终端使用该命令发布的内容:

Collecting slycot
  Using cached https://files.pythonhosted.org/packages/ae/9d/7ed3f2abf08aab0be9ac2b67e3040c20d9c594cce6a4af2203da0c28a6c4/slycot-0.3.5.0.tar.gz
  Installing build dependencies ... done
  Missing build requirements in pyproject.toml for slycot from https://files.pythonhosted.org/packages/ae/9d/7ed3f2abf08aab0be9ac2b67e3040c20d9c594cce6a4af2203da0c28a6c4/slycot-0.3.5.0.tar.gz#sha256=cad98d5ea4f0a034cf398c39189f587620a0b03f1d4b71e77cd622a327f13adf.
  The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
  Getting requirements to build wheel ... error
  Complete output from command /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpz94vocr1:
  Traceback (most recent call last):
    File "setup.py", line 25, in <module>
      from skbuild import setup
  ModuleNotFoundError: No module named 'skbuild'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 130, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 112, in _get_build_requires
      self.run_setup()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 211, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/build_meta.py", line 126, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 28, in <module>
      raise ImportError('sckit-build must be installed before running setup.py')
  ImportError: sckit-build must be installed before running setup.py

  ----------------------------------------
Command "/Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpz94vocr1" failed with error code 1 in /private/tmp/pip-install-t9m8s8yp/slycot
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

我现在尝试了pip install scikit-build 并且返回了

Requirement already satisfied: scikit-build in /Library/Python/3.7/site-packages (0.10.0)
Requirement already satisfied: packaging in /Library/Python/3.7/site-packages (from scikit-build) (20.1)
Requirement already satisfied: setuptools>=28.0.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-build) (40.8.0)
Requirement already satisfied: wheel>=0.29.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from scikit-build) (0.33.1)
Requirement already satisfied: pyparsing>=2.0.2 in /Library/Python/3.7/site-packages (from packaging->scikit-build) (2.4.6)
Requirement already satisfied: six in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages (from packaging->scikit-build) (1.12.0)
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

我也试过了,pip install cmake 并返回

Requirement already satisfied: cmake in /Library/Python/3.7/site-packages (3.16.3)
You are using pip version 19.0.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

任何帮助将不胜感激。

【问题讨论】:

  • 你可能有更多错误,请附上
  • 我更新了帖子。

标签: python macos terminal


【解决方案1】:

您在安装slycot 时遇到另一个错误,您依赖于skbuild

为了修复它,请检查这个网站,它为您提供了 skbuild 包的编译二进制文件,然后重试 [也许还有 cmake]

试试这个

pip install scikit-build; pip install cmake

您可以在此处阅读更多详细信息以及实现此目的的方法。

Not able to install skbuild

【讨论】:

  • 我尝试了这两个,每个都返回,“要求已经满足”
  • 这是你的错误:ImportError: sckit-build must be installed before running setup.py ModuleNotFoundError: No module named 'skbuild'
猜你喜欢
  • 1970-01-01
  • 2020-03-15
  • 2020-01-24
  • 2018-10-04
  • 1970-01-01
  • 1970-01-01
  • 2018-05-04
  • 2022-07-15
  • 2017-01-20
相关资源
最近更新 更多