[
https://issues.apache.org/jira/browse/ARROW-17771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17610127#comment-17610127
]
Alenka Frim commented on ARROW-17771:
-------------------------------------
I did some testing on my local Windows machine and this is what I found:
* With Python 3.8, without setting {{CONDA_DLL_SEARCH_MODIFICATION=1}} and
running
{code:java}
python install -e .
{code}
instead of making an inplace build there is no difference, the *arrow_python
lib is not found*. I had to add {{CONDA_DLL_SEARCH_MODIFICATION}} env var to
make it work.
* With *Python 3.10* the inplace build works and there is no need to set
{{CONDA_DLL_SEARCH_MODIFICATION}} as the libs are found correctly.
I still do not understand why is this happening and why is
{{CONDA_DLL_SEARCH_MODIFICATION}} needed as we do not use
{{os.add_dll_directory}} in the project. But am happy to see that the issue is
resolved with Python 3.10.
I propose keeping the {{CONDA_DLL_SEARCH_MODIFICATION}} env var set to 1 in
case older versions of Python are used. What I can do is to add a check for
Python version in setup.py and set the {{CONDA_DLL_SEARCH_MODIFICATION}} env
var automatically for older versions of Python.
> [Python] Python does not finds the DLLs correctly on Windows
> ------------------------------------------------------------
>
> Key: ARROW-17771
> URL: https://issues.apache.org/jira/browse/ARROW-17771
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Reporter: Alenka Frim
> Priority: Critical
> Fix For: 10.0.0
>
>
> It seems that after the Python refactoring PR
> [https://github.com/apache/arrow/pull/13311] (ARROW-16340) Python is unable
> to find {{arrow_python}} even though the library it is imported into the
> correct directory.
> Currently this issue is fixed with setting an additional environment variable:
> {code:}
> CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1
> {code}
> We need to investigate further why this error is happening after the
> [refactoring|https://github.com/apache/arrow/pull/13311] and make sure Python
> is able to find the libraries on Windows without the additional env vars
> being specified.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)