代码之家  ›  专栏  ›  技术社区  ›  notyouraveragetoru

错误:在PYCHARM中为pyarrow构建轮子失败

  •  0
  • notyouraveragetoru  · 技术社区  · 1 年前

    我无法安装pyarrow和streamlight,我已经试过了 我试着安装

    • python 3.12.0的最新版本
    • pyarrow 9.0.0,因为最新版本不起作用
    • cmake
    • setuptools

    仍然是相同的错误,在pyarrow和streamlight上

    这是streamlight的全部错误

     creating C:\Users\CA6988\AppData\Local\Temp\pip-install-rdioavy1\pyarrow_68d4936b97c944838372666da02b0879\build\temp.win-amd64-cpython-312
          -- Running cmake for PyArrow
          cmake -DCMAKE_INSTALL_PREFIX=C:\Users\CA6988\AppData\Local\Temp\pip-install-rdioavy1\pyarrow_68d4936b97c944838372666da02b0879\build\lib.win-amd64-cpython-312\pyarrow -DPYTHON
    _EXECUTABLE=C:\Users\CA6988\AppData\Local\Programs\Python\Python312\python.exe -DPython3_EXECUTABLE=C:\Users\CA6988\AppData\Local\Programs\Python\Python312\python.exe -DPYARROW_CXX
    FLAGS= -G "Visual Studio 15 2017 Win64" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_SUBSTRAIT=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_ACERO=off -DPY
    ARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_GCS=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HD
    FS=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_CYTHON_CPP=off -DPYARROW_GENERATE_COVERAGE=off -DCMAKE_BUILD_TYPE=release C:\Users\CA6988\AppData\Local\Temp\pip-install-rdioavy1\pyarrow_68d4936b97c944838372666da02b0879
          CMake Error at CMakeLists.txt:22 (project):
            Generator
    
              Visual Studio 15 2017 Win64
    
            could not find any instance of Visual Studio.
    
    
    
          -- Configuring incomplete, errors occurred!
          error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit code 1
          [end of output]
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for pyarrow
    Failed to build pyarrow
    ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
    
    

    以下是pyarrow的完整错误

     Building wheel for pyarrow (pyproject.toml) ... error
      error: subprocess-exited-with-error
    
      × Building wheel for pyarrow (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [297 lines of output]
    
    
    - Running cmake for PyArrow
          cmake -DCMAKE_INSTALL_PREFIX=C:\Users\CA6988\AppData\Local\Temp\pip-install-dr5p7p2s\pyarrow_b72618e712c24bd6a4a07b35825a1199\build\lib.win-amd64-cpython-312\pyarrow -DPYTHON
    _EXECUTABLE=C:\Users\CA6988\AppData\Local\Programs\Python\Python312\python.exe -DPython3_EXECUTABLE=C:\Users\CA6988\AppData\Local\Programs\Python\Python312\python.exe -DPYARROW_CXX
    FLAGS= -G "Visual Studio 15 2017 Win64" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_SUBSTRAIT=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_ACERO=off -DPY
    ARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_GCS=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HD
    FS=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_CYTHON_CPP=off -DPYARROW_GENERATE_COVERAGE=off -DCMAKE_BUILD_TYPE=release C:\Users\CA6988\AppData\Local\Temp\pip-install-dr5p7p2s\pyarrow_b72618e712c24bd6a4a07b35825a1199
          CMake Error at CMakeLists.txt:22 (project):
            Generator
    
              Visual Studio 15 2017 Win64
    
            could not find any instance of Visual Studio.
    
    
    
          -- Configuring incomplete, errors occurred!
          error: command 'C:\\Program Files\\CMake\\bin\\cmake.exe' failed with exit code 1
          [end of output]
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for pyarrow
    Failed to build pyarrow
    ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
    
    

    我想安装streamlit和pyarrow,但即使我下载不同版本、强制重新安装或直接安装或卸载python和pycharm,错误也是一致的。

    1 回复  |  直到 1 年前
        1
  •  0
  •   assignUser    1 年前

    pyarrow在3.12上还没有轮子,14.0.0目前正在发布,它将与3.12的轮子一起发布。因此,您可以降级您的python版本,该版本应该允许您使用现有的轮子,或者等待14.0.0。

    如果你只想使用pyarrow,我不建议你使用一个更复杂的变体,那就是根据开发文档从源代码手动构建pyarrow(可能还有libarrow): https://arrow.apache.org/docs/developers/python.html