ping13 commented on issue #44696:
URL: https://github.com/apache/arrow/issues/44696#issuecomment-3368486435

   I hit the same issue on macOS, I use `uv` and wanted to be independent of 
`conda`. After some iterations, I fixed it by forcing pyogrio and pyarrow to 
build against the Homebrew-installed libraries.
   
   With some rewrite from Copilot, this script should be working for someone in 
the same situation:
   
   ```bash
   #!/usr/bin/env bash
   # align_with_homebrew.sh — rebuild pyogrio & pyarrow against Homebrew libs 
on macOS
   
   set -euo pipefail
   
   need() { command -v "$1" >/dev/null 2>&1 || { echo "Missing required 
command: $1" >&2; exit 1; }; }
   
   need brew
   need uv
   need jq
   
   echo "Sync environment with uv…"
   uv sync -U
   
   echo "Aligning pyogrio with Homebrew GDAL…"
   GDAL_PREFIX="$(brew --prefix gdal)"
   uv pip uninstall -y pyogrio || true
   CMAKE_PREFIX_PATH="$GDAL_PREFIX" uv pip install --no-binary=pyogrio pyogrio
   
   echo "Aligning pyarrow with Homebrew Apache Arrow…"
   ARROW_PREFIX="$(brew --prefix apache-arrow)"
   ARROW_VER="$(brew info --json apache-arrow | jq -r '.[0].versions.stable')"
   
   uv pip uninstall -y pyarrow || true
   PKG_CONFIG_PATH="$ARROW_PREFIX/lib/pkgconfig" \
   CMAKE_PREFIX_PATH="$ARROW_PREFIX" \
   ARROW_HOME="$ARROW_PREFIX" \
   uv pip install --no-binary=pyarrow "pyarrow==${ARROW_VER}"
   
   echo "Done. pyogrio and pyarrow are now built against Homebrew's GDAL/Arrow."
   ```
   
   I hope this is of help to someone.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to