首页 > 解决方案 > 我的树莓派 4 上 Apache 后面的 Flask 应用程序,numpy 错误

问题描述

我在烧瓶项目中安装需求时遇到了一些问题,我想部署在安装在树莓派 4 型号 b 上的 Web 服务器中,但我收到此错误,似乎 numpy 有问题,我试图解决安装 pywheels 的问题,但它仍然显示此错误消息。也许我瞄准了错误的错误,因为我只能看到很多

Installing build dependencies ... error
  Complete output from command /usr/bin/python -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-rxcS85 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel scikit-build cmake pip "numpy==1.11.3; python_version=='3.5'" "numpy==1.13.3; python_version=='3.6'" "numpy==1.14.5; python_version=='3.7'" "numpy==1.17.3; python_version>='3.8'":
  Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8"' don't match your environment
  Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
  Collecting setuptools
    Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
  Collecting scikit-build
    Using cached https://files.pythonhosted.org/packages/78/c9/7c2c7397ea64e36ebb292446896edcdecbb8c1aa6b9a1a32f6f67984c3df/scikit_build-0.11.1-py2.py3-none-any.whl
  Collecting cmake
    Using cached https://files.pythonhosted.org/packages/26/76/b6df98a03343160a27c449c2866d8b94d349be4a3a6632aaf49c8d27916b/cmake-3.18.4.post1.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
  Collecting pip
    Using cached https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl
  Collecting packaging (from scikit-build)
    Using cached https://files.pythonhosted.org/packages/3e/89/7ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af/packaging-20.9-py2.py3-none-any.whl
  Collecting distro (from scikit-build)
    Using cached https://files.pythonhosted.org/packages/25/b7/b3c4270a11414cb22c6352ebc7a83aaa3712043be29daa05018fd5a5c956/distro-1.5.0-py2.py3-none-any.whl
  Collecting pyparsing>=2.0.2 (from packaging->scikit-build)
    Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
  Building wheels for collected packages: cmake
    Running setup.py bdist_wheel for cmake: started
    Running setup.py bdist_wheel for cmake: finished with status 'error'
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xpMUeB/cmake/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-k7gsYp --python-tag cp27:
    Traceback (most recent call last):
      File "/tmp/pip-build-env-xLr_f2/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
        cmkr = cmaker.CMaker(cmake_executable)
      File "/tmp/pip-build-env-xLr_f2/lib/python2.7/site-packages/skbuild/cmaker.py", line 95, in __init__
        self.cmake_version = get_cmake_version(self.cmake_executable)
      File "/tmp/pip-build-env-xLr_f2/lib/python2.7/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
        "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)

    Problem with the CMake installation, aborting build. CMake executable is cmake

    ----------------------------------------
    Failed building wheel for cmake
    Running setup.py clean for cmake
  Failed to build cmake
  Installing collected packages: setuptools, wheel, pyparsing, packaging, distro, scikit-build, cmake, pip
    Running setup.py install for cmake: started
      Running setup.py install for cmake: finished with status 'error'
      Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xpMUeB/cmake/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-VMzRHy/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-rxcS85 --compile:
      Traceback (most recent call last):
        File "/tmp/pip-build-env-xLr_f2/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
          cmkr = cmaker.CMaker(cmake_executable)
        File "/tmp/pip-build-env-xLr_f2/lib/python2.7/site-packages/skbuild/cmaker.py", line 95, in __init__
          self.cmake_version = get_cmake_version(self.cmake_executable)
        File "/tmp/pip-build-env-xLr_f2/lib/python2.7/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
          "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)

      Problem with the CMake installation, aborting build. CMake executable is cmake

      ----------------------------------------
  Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-xpMUeB/cmake/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-VMzRHy/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-rxcS85 --compile" failed with error code 1 in /tmp/pip-install-xpMUeB/cmake/

  ----------------------------------------
Command "/usr/bin/python -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-rxcS85 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel scikit-build cmake pip "numpy==1.11.3; python_version=='3.5'" "numpy==1.13.3; python_version=='3.6'" "numpy==1.14.5; python_version=='3.7'" "numpy==1.17.3; python_version>='3.8'"" failed with error code 1 in None

标签: pythonnumpycmakepipraspberry-pi

解决方案


推荐阅读