You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS下安装Python版PDAL失败:构建Wheel出错求助

MacOS下PDAL Python包安装失败的解决办法

环境信息

  • MacOS
  • Python 3.9.14
  • Pip 23.2.1

问题原因

Python版PDAL包依赖系统预先安装的PDAL核心库,直接通过pip安装时,编译过程中CMake无法找到PDAL的配置文件(PDALConfig.cmake或pdal-config.cmake),导致编译失败。

关键错误日志

CMake Error at CMakeLists.txt:26 (find_package):
  By not providing "FindPDAL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PDAL", but
  CMake did not find one.

  Could not find a package configuration file provided by "PDAL" (requested
  version 2.4) with any of the following names:

    PDALConfig.cmake
    pdal-config.cmake

  Add the installation prefix of "PDAL" to CMAKE_PREFIX_PATH or set
  "PDAL_DIR" to a directory containing one of the above files.  If "PDAL"
  provides a separate development package or SDK, be sure it has been
  installed.

解决方法

1. 通过Homebrew安装PDAL核心库(推荐)

这是MacOS上最便捷的方式:

  • 终端执行安装PDAL:
    brew install pdal
    
  • 安装完成后,再执行pip安装Python包:
    pip install pdal
    

2. 指定PDAL安装路径(手动编译安装PDAL时适用)

如果是手动编译安装的PDAL,需要明确告诉CMake其安装位置:

PDAL_DIR=/你的PDAL安装目录 pip install pdal

替换/你的PDAL安装目录为实际路径,该路径下需包含PDALConfig.cmake文件。

3. 使用conda安装(Anaconda环境适用)

若你的Python环境由conda管理,可直接安装conda维护的PDAL包:

conda install -c conda-forge pdal

内容的提问来源于stack exchange,提问作者Vilerala

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 23:27:31