Closed mgedmin closed 3 hours ago
The stacktrace shows that this issue is not with this tool but with virtualenv.
Looking closer at the traceback it looks like it's virtualenv itself that's looping through the PATH. Maybe I should open a virtualenv bug? However, when virtualenv is being called by tools like pipx I don't see this issue, so tox must be doing something differently.
Running virtualenv
manually also doesn't have any issues.
I am not sure. However, we are not doing anything special.
Issue
I'm trying to do some Python development on an Android phone. I
pkg install python pipx
, Ipipx install tox
, and when I runtox
, I getEnvironment
Provide at least:
Output of
```console $ pipx runpip tox list Package Version ------------- ------- cachetools 5.5.0 chardet 5.2.0 colorama 0.4.6 distlib 0.3.9 filelock 3.16.1 packaging 24.1 pip 24.3.1 platformdirs 4.3.6 pluggy 1.5.0 pyproject-api 1.8.0 tox 4.23.2 virtualenv 20.27.1 ```pip list
of the host Python, wheretox
is installedOutput of running tox
Output of
```console $ tox -rvv .pkg: 571 I find interpreter for spec PythonSpec(path=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python) [virtualenv/discovery/builtin.py:73] .pkg: 572 D filesystem is case-sensitive [virtualenv/info.py:25] .pkg: 574 D got python info of %s from (PosixPath('/data/data/com.termux/files/usr/bin/python3.12'), PosixPath('/data/data/com.termux/files/home/.local/share/virtualenv/py_info/1/b79a9a5477d361435df197a745d21ec01f512605a327ac6a32dfd7a0672634c1.json')) [virtualenv/app_data/via_disk_folder.py:131] .pkg: 575 I proposed PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 575 D accepted PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:82] .pkg: 667 I find interpreter for spec PythonSpec(path=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python) [virtualenv/discovery/builtin.py:73] .pkg: 668 I proposed PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 668 D accepted PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:82] .pkg: 676 I find interpreter for spec PythonSpec(major=3, minor=12) [virtualenv/discovery/builtin.py:73] .pkg: 676 I proposed PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 676 D accepted PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:82] .pkg: 683 I find interpreter for spec PythonSpec(major=3, minor=13) [virtualenv/discovery/builtin.py:73] .pkg: 683 I proposed PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 683 D discover PATH[0]=/data/data/com.termux/files/home/bin [virtualenv/discovery/builtin.py:149] .pkg: 690 D get interpreter info via cmd: /data/data/com.termux/files/home/bin/python3.13 /data/data/com.termux/files/home/.local/pipx/venvs/tox/lib/python3.12/site-packages/virtualenv/discovery/py_info.py N0OSS5OYVRURUGg3TsLDMtwMeT5bGHz6 7WPLU2nigNZNwTwi6kHraVb31Eb0tpeI [virtualenv/discovery/cached_py_info.py:112] .pkg: 704 I failed to query /data/data/com.termux/files/home/bin/python3.13 with code 1 out: 'python3.13 not installed, try\n\n rebuild-python --branch=3.13 --pull --clean\n' [virtualenv/discovery/cached_py_info.py:34] .pkg: 704 D discover PATH[1]=/data/data/com.termux/files/home/bin/local [virtualenv/discovery/builtin.py:149] .pkg: 704 D discover PATH[2]=/data/data/com.termux/files/home/.local/bin [virtualenv/discovery/builtin.py:149] .pkg: 707 D discover PATH[3]=/data/data/com.termux/files/usr/bin [virtualenv/discovery/builtin.py:149] .pkg: 712 D got python info of %s from (PosixPath('/data/data/com.termux/files/usr/bin/python3'), PosixPath('/data/data/com.termux/files/home/.local/share/virtualenv/py_info/1/dc9930c17e9cd9135e54e5b33ca6344ea5ed0954bc7fe787d0822891c3159b6d.json')) [virtualenv/app_data/via_disk_folder.py:131] .pkg: 713 I proposed PathPythonInfo(spec=CPython3.12.7.final.0-64, exe=/data/data/com.termux/files/usr/bin/python3, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 714 D discover PATH[4]=/apex/com.android.runtime/bin [virtualenv/discovery/builtin.py:149] .pkg: 715 D discover PATH[5]=/apex/com.android.art/bin [virtualenv/discovery/builtin.py:149] .pkg: 715 D discover PATH[6]=/system_ext/bin [virtualenv/discovery/builtin.py:149] .pkg: 725 I find interpreter for spec PythonSpec(path=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python) [virtualenv/discovery/builtin.py:73] .pkg: 726 I proposed PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 726 D accepted PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:82] .pkg: 732 I find interpreter for spec PythonSpec(path=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python) [virtualenv/discovery/builtin.py:73] .pkg: 733 I proposed PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:80] .pkg: 733 D accepted PythonInfo(spec=CPython3.12.7.final.0-64, system=/data/data/com.termux/files/usr/bin/python3.12, exe=/data/data/com.termux/files/home/.local/pipx/venvs/tox/bin/python, platform=linux, version='3.12.7 (main, Oct 23 2024, 22:38:17) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:82] Traceback (most recent call last): File "/data/data/com.termux/files/home/.local/bin/tox", line 8, intox -rvv
Minimal example
Additional information
My $PATH is
I have no idea why Termux puts an inaccessible directory on the default PATH, but it would be helpful if Tox's interpreter discovery would skip it instead of failing entirely.