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

   The basic question: Is it possible to install pyarrow in a way that doesn't 
include libarrow as a static bundle or otherwise tell it to use a system 
installed one?
   
   Background: I am on a mac and using R & RStudio. Our R code uses many 
packages that use gdal and on Mac the natural way to get that is to use 
homebrew install which also installs the homebrew package `apache-arrow` which 
includes libarrow. But I'm also working with python code that calls out to R 
packages (using rpy2) which naturally loads the homebrew version of libarrow 
indirectly. I'm _also_  using geopandas which in order to write out 
GeoDataFrame objects into parquet files requires pyarrow installed. And thus I 
hit this issue.
   
   I can workaround it in a number of ways:
   
   * round trip geopandas dataframes into R, then back to python pandas data 
frames and use `pandas.DataFram,to_parquet` with `engine="fastparquet"` (this 
maps the geometry column into WKT)
   * within python convert geopandas dataframes into pandas versions, manually 
converting the geometry column and then use pandas `to_parquet` (as above).
   * rewrite any code that needs to write geopandas dataframes to parquet to 
avoid import of rpy2 (thus avoiding the R environment being loaded and thus 
loading system / howbrew libarrow). 
   
   But given that libarrow installed as part of pyarrow on disk is already 50MB 
and I have another one installed in the homebrew setup (same version even!) it 
would be nice to just have one installed.


-- 
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