[ 
https://issues.apache.org/jira/browse/ARROW-18129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634821#comment-17634821
 ] 

Alenka Frim commented on ARROW-18129:
-------------------------------------

Yes, in case of using conda the Arrow C++ headers are not found in the python 
package ({{{}pyarrow/include){}}} due to conda recipe using 
{{{}PYARROW_BUNDLE_ARROW_CPP_HEADERS=0{}}}, see: 
[https://github.com/apache/arrow/blob/16fd7f3fabbe663c161899d197deb66a7ec188b5/dev/tasks/conda-recipes/arrow-cpp/build-pyarrow.sh#L11]

With Apache Arrow 10.0.0 the C++ code connected to PyArrow (PyArrow C++) has 
been moved to the python package and so the header files for PyArrow C++ should 
always be included in the package itself. To track that work we created another 
issue https://issues.apache.org/jira/browse/ARROW-18340.

Regarding the headers for Arrow C++: we should add info in the 
documentation/docstrings to make it clear that the  Arrow C+ header files are 
not located in the python package if one is using conda.

We could also add {{$CONDA_PREFIX/include/arrow}} path in the {{get_include()}} 
function if one is using conda. [~apitrou] what is your opinion on that?

> [Python] get_include() gives wrong directory in conda environment
> -----------------------------------------------------------------
>
>                 Key: ARROW-18129
>                 URL: https://issues.apache.org/jira/browse/ARROW-18129
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 9.0.0
>         Environment: conda
>            Reporter: Left Screen
>            Priority: Critical
>              Labels: triaged
>
> {{get_include}} seems to do:
>  
> {code:java}
> def get_include():
>     """
>     Return absolute path to directory containing Arrow C++ include
>     headers. Similar to numpy.get_include
>     """
>     return _os.path.join(_os.path.dirname(__file__), 'include') {code}
> This returns something like:
> {code:java}
> /path/to/myconda/envs/envname/lib/python3.8/site-packages/pyarrow/include{code}
> which does not exist in a conda environment. The path where the headers 
> actually get installed is to:
>  
> {code:java}
> $ echo $CONDA_PREFIX
> /path/to/myconda/envs/envname
> $ ls $CONDA_PREFIX/include/arrow | head
> adapters
> api.h
> array
> array.h
> buffer_builder.h
> buffer.h
> builder.h
> c
> chunked_array.h
> chunk_resolver.h
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to