You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alenka Frim (Jira)" <ji...@apache.org> on 2022/09/27 16:38:00 UTC

[jira] [Comment Edited] (ARROW-17771) [Python] Python does not finds the DLLs correctly on Windows

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

Alenka Frim edited comment on ARROW-17771 at 9/27/22 4:37 PM:
--------------------------------------------------------------

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.
https://gist.github.com/AlenkaF/bb12bbe2051db5854e10747e13ca5b91

 * 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.
https://gist.github.com/AlenkaF/0dc8bc837472f83731dd6fa22fce558b

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.


was (Author: alenkaf):
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)