首页 > 解决方案 > 未能建立球面几何。错误:无法为使用 PEP 517 且无法直接安装的球面几何构造轮子

问题描述

我只是想用 pip 安装包 'spherical-geometry 但失败了。我的 python 版本在 Mac OS 系统中是 3.8。并且 pip 是由 anaconda3 安装的。下面我显示了主要报告的错误。我想知道如何解决这个问题。

(base) ➜  Applications pip install spherical-geometry
Collecting spherical-geometry
  Using cached spherical_geometry-1.2.19.tar.gz (9.2 MB)
  Installing build dependencies ... done
Building wheels for collected packages: spherical-geometry
  Building wheel for spherical-geometry (PEP 517) ... error
  ERROR: Command errored out with exit status 1:

  In file included from libqd/src/dd_const.cpp:11:
  In file included from libqd/include/qd/dd_real.h:32:
...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:640:26: error: no template named 'numeric_limits'
      bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                           ^
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:640:60: error: no template named 'numeric_limits'
      bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                                                             ^
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:641:18: error: no template named 'numeric_limits'
      int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                   ^
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:641:50: error: no template named 'numeric_limits'
      int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                                                   ^
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:646:17: error: no template named 'numeric_limits'
    static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
                  ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  /private/var/folders/77/s1_49xgj7bv4gxjwsbfgbh8m0000gn/T/pip-build-env-rucjcqmx/overlay/lib/python3.8/site-packages/setuptools/dist.py:642: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
    warnings.warn(
  /private/var/folders/77/s1_49xgj7bv4gxjwsbfgbh8m0000gn/T/pip-build-env-rucjcqmx/overlay/lib/python3.8/site-packages/setuptools/dist.py:642: UserWarning: Usage of dash-separated 'show-response' will not be supported in future versions. Please use the underscore name 'show_response' instead
    warnings.warn(
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for spherical-geometry
Failed to build spherical-geometry
ERROR: Could not build wheels for spherical-geometry which use PEP 517 and cannot be installed directly

标签: pippython-3.8

解决方案


推荐阅读