kou commented on pull request #12320:
URL: https://github.com/apache/arrow/pull/12320#issuecomment-1052716975


   I took a look at this on ci.ursalabs.org.
   
   I don't know much about venv but it seems that it works only when we use 
`${VENV_ROOT}/bin/python3` (this is a symbolic link for the base `python3`) 
instead of the base `python3`:
   
   ```console
   cpp-build$ ls -lah ../venv-source/bin
   total 96
   drwxr-xr-x  15 ursa  staff   480B  2 26 15:15 .
   drwxr-xr-x   6 ursa  staff   192B  2 26 15:15 ..
   -rw-r--r--   1 ursa  staff   8.6K  2 26 15:15 Activate.ps1
   -rw-r--r--   1 ursa  staff   1.9K  2 26 15:15 activate
   -rw-r--r--   1 ursa  staff   917B  2 26 15:15 activate.csh
   -rw-r--r--   1 ursa  staff   2.0K  2 26 15:15 activate.fish
   -rwxr-xr-x   1 ursa  staff   308B  2 26 15:15 f2py
   -rwxr-xr-x   1 ursa  staff   308B  2 26 15:15 f2py3
   -rwxr-xr-x   1 ursa  staff   308B  2 26 15:15 f2py3.9
   -rwxr-xr-x   1 ursa  staff   313B  2 26 15:15 pip
   -rwxr-xr-x   1 ursa  staff   313B  2 26 15:15 pip3
   -rwxr-xr-x   1 ursa  staff   313B  2 26 15:15 pip3.9
   lrwxr-xr-x   1 ursa  staff     9B  2 26 15:15 python -> python3.9
   lrwxr-xr-x   1 ursa  staff     9B  2 26 15:15 python3 -> python3.9
   lrwxr-xr-x   1 ursa  staff    42B  2 26 15:15 python3.9 -> 
/opt/homebrew/opt/[email protected]/bin/python3.9
   cpp-build$ arch -arm64 bash -c 'source ../venv-source/bin/activate; python3 
-c "import numpy"'
   cpp-build$ arch -arm64 bash -c 'source ../venv-source/bin/activate; 
/opt/homebrew/opt/[email protected]/bin/python3 -c "import numpy"'
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
   ModuleNotFoundError: No module named 'numpy'
   cpp-build$ arch -arm64 bash -c '../venv-source/bin/python3 -c "import numpy"'
   ```
   It seems that we need to set `PYTHONHOME`, `PYTHONLIB` or something for 
`arrow-python-test` because `arrow-python-test` isn't executed by `python3`. 
`arrow-python-test` doesn't use `python3`. `arrow-python-test` uses 
`libpython3.9.dylib` directly.


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