astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
27.96k stars 803 forks source link

uvx confused about executables "visidata" provides on windows #9303

Open hwine opened 1 week ago

hwine commented 1 week ago

uvx is confused confused about executables provided by package visidata on windows:

❯ uvx --from visidata vd t.csv
Installed 3 packages in 224ms
The executable `vd` was not found.
warning: An executable named `vd` is not provided by package `visidata`.
The following executables are provided by `visidata`:
- vd
- visidata.exe
Consider using `uvx --from visidata <EXECUTABLE_NAME>` instead.

tmp on  main [?] pyenv took 4s
1 ❯ uvx --version
uv-tool-uvx 0.5.2 (195f4b634 2024-11-14)

I upgraded, and got the same error on uv-tool-uvx 0.5.4 (c62c83c37 2024-11-20)

This is on an interesting machine/os: win11 on arm64, mostly in git-bash shell (but same results using powershell.

log with `--verbose` option ```text ❯ uvx --verbose --from visidata vd t.csv DEBUG uv 0.5.4 (c62c83c37 2024-11-20) DEBUG Searching for default Python interpreter in managed installations, search path, or registry DEBUG Searching for managed installations at `C:\Users\hwine\AppData\Roaming\uv\python` DEBUG Found managed installation `cpython-3.13.0-windows-x86_64-none` DEBUG Found `cpython-3.13.0-windows-x86_64-none` at `C:\Users\hwine\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\python.exe` (managed installations) DEBUG Acquired lock for `C:\Users\hwine\AppData\Roaming\uv\tools` DEBUG Released lock at `C:\Users\hwine\AppData\Roaming\uv\tools\.lock` DEBUG Caching via interpreter: `C:\Users\hwine\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\python.exe` DEBUG Using request timeout of 30s DEBUG Solving with installed Python version: 3.13.0 DEBUG Solving with target Python version: >=3.13.0 DEBUG Adding direct dependency: visidata* DEBUG Found stale response for: https://pypi.org/simple/visidata/ DEBUG Sending revalidation request for: https://pypi.org/simple/visidata/ DEBUG Found not-modified response for: https://pypi.org/simple/visidata/ DEBUG Searching for a compatible version of visidata (*) DEBUG Selecting: visidata==3.1.1 [compatible] (visidata-3.1.1-py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/56/60/5026e693dbd4c38d2d13a697aa61846a6791bd6131e8a84c8aa61c0d5180/visidata-3.1.1-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.1.1: python-dateutil* DEBUG Adding transitive dependency for visidata==3.1.1: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==3.1.1: windows-curses{platform_system == 'Windows'}<2.3.1 | >=2.3.1+ DEBUG Found stale response for: https://pypi.org/simple/python-dateutil/ DEBUG Sending revalidation request for: https://pypi.org/simple/python-dateutil/ DEBUG Found stale response for: https://pypi.org/simple/importlib-metadata/ DEBUG Sending revalidation request for: https://pypi.org/simple/importlib-metadata/ DEBUG Found stale response for: https://pypi.org/simple/windows-curses/ DEBUG Sending revalidation request for: https://pypi.org/simple/windows-curses/ DEBUG Found not-modified response for: https://pypi.org/simple/python-dateutil/ DEBUG Found not-modified response for: https://pypi.org/simple/importlib-metadata/ DEBUG Found not-modified response for: https://pypi.org/simple/windows-curses/ DEBUG Searching for a compatible version of python-dateutil (*) DEBUG Selecting: python-dateutil==2.9.0.post0 [compatible] (python_dateutil-2.9.0.post0-py2.py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/a0/d9/a1e041c5e7caa9a05c925f4bdbdfb7f006d1f74996af53467bc394c97be7/importlib_metadata-8.5.0-py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata DEBUG Adding transitive dependency for python-dateutil==2.9.0.post0: six>=1.5 DEBUG Searching for a compatible version of importlib-metadata (>=3.6) DEBUG Selecting: importlib-metadata==8.5.0 [compatible] (importlib_metadata-8.5.0-py3-none-any.whl) DEBUG Adding transitive dependency for importlib-metadata==8.5.0: zipp>=3.20 DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.3.1 | >=2.3.1+) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.3.1 | >=2.3.1+, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.3.1 | >=2.3.1+, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Found stale response for: https://pypi.org/simple/six/ DEBUG Sending revalidation request for: https://pypi.org/simple/six/ DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Found stale response for: https://pypi.org/simple/zipp/ DEBUG Sending revalidation request for: https://pypi.org/simple/zipp/ DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.2.0 | >2.2.0, <2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.1.0 | >2.1.0, <2.2.0 | >2.2.0, <2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.0.1 | >2.0.1, <2.1.0 | >2.1.0, <2.2.0 | >2.2.0, <2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<2.0 | >2.0, <2.0.1 | >2.0.1, <2.1.0 | >2.1.0, <2.2.0 | >2.2.0, <2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<1.1 | >1.1, <2.0 | >2.0, <2.0.1 | >2.0.1, <2.1.0 | >2.1.0, <2.2.0 | >2.2.0, <2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (<1.0 | >1.0, <1.1 | >1.1, <2.0 | >2.0, <2.0.1 | >2.0.1, <2.1.0 | >2.1.0, <2.2.0 | >2.2.0, <2.3.0 | >2.3.0, <2.3.1 | >=2.3.1+, <2.3.2 | >2.3.2, <2.3.3 | >2.3.3, <2.4.0 | >2.4.0) DEBUG No compatible version found for: windows-curses{platform_system == 'Windows'} DEBUG Searching for a compatible version of visidata (<3.1.1 | >3.1.1) DEBUG Selecting: visidata==3.1 [compatible] (visidata-3.1-py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/7d/32/202c4207b00f0fa32055da656fb2dae006658390bcdac635bb044c3b8dd7/visidata-3.1-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.1: python-dateutil* DEBUG Adding transitive dependency for visidata==3.1: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==3.1: windows-curses{platform_system == 'Windows'}<2.3.1 | >=2.3.1+ DEBUG Searching for a compatible version of visidata (<3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==3.0.2 [compatible] (visidata-3.0.2-py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/84/12/afe992fdd2c7c41c13f1397f45366f4e2039e2bd5c0bb76108370c0d543e/visidata-3.0.2-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.0.2: python-dateutil* DEBUG Adding transitive dependency for visidata==3.0.2: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==3.0.2: windows-curses{platform_system == 'Windows'}<2.3.1 | >=2.3.1+ DEBUG Searching for a compatible version of visidata (<3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==3.0.1 [compatible] (visidata-3.0.1-py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/c3/48/896b946bb8ddbcebd678a6cf784286275ebcfafb59bdb08af411b0f033bf/visidata-3.0.1-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.0.1: python-dateutil* DEBUG Adding transitive dependency for visidata==3.0.1: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==3.0.1: windows-curses{platform_system == 'Windows'}<2.3.1 | >=2.3.1+ DEBUG Searching for a compatible version of visidata (<3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==3.0 [compatible] (visidata-3.0-py3-none-any.whl) DEBUG Prefetching 5 visidata versions DEBUG Found fresh response for: https://files.pythonhosted.org/packages/53/c3/cd217f9621e520fb29cb28ed153c994d25f1c2475c49640ee488a398a48d/visidata-2.11.1-py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/3c/e1/2ba308b4f5e000b06ed81622c1d734fff5dfa5353a1f07561acdfbc2c394/visidata-3.0-py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/8c/a2/90b632ce4f9d11de1ab0600714bb57cc2aff662a47183111f55790f8f9b6/visidata-2.11-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.0: python-dateutil* DEBUG Found fresh response for: https://files.pythonhosted.org/packages/d0/e2/dfb2f2a436cda0f0f33dcd4582168010d2536948e90c4549d4b158952116/visidata-2.10.1-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.0: importlib-metadata>=3.6 DEBUG Found fresh response for: https://files.pythonhosted.org/packages/92/b6/bab9e47a88c9ffb3505ee2e05d56330852f12d48d983850f2d401e92bdae/visidata-2.10.2-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==3.0: windows-curses{platform_system == 'Windows'}<2.3.1 | >=2.3.1+ DEBUG Searching for a compatible version of visidata (<3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==2.11.1 [compatible] (visidata-2.11.1-py3-none-any.whl) DEBUG Adding transitive dependency for visidata==2.11.1: python-dateutil* DEBUG Adding transitive dependency for visidata==2.11.1: importlib-metadata>=3.6 DEBUG Found not-modified response for: https://pypi.org/simple/six/ DEBUG Adding transitive dependency for visidata==2.11.1: windows-curses{platform_system == 'Windows'}* DEBUG Searching for a compatible version of python-dateutil (*) DEBUG Selecting: python-dateutil==2.9.0.post0 [compatible] (python_dateutil-2.9.0.post0-py2.py3-none-any.whl) DEBUG Found not-modified response for: https://pypi.org/simple/zipp/ DEBUG Searching for a compatible version of importlib-metadata (>=3.6) DEBUG Selecting: importlib-metadata==8.5.0 [compatible] (importlib_metadata-8.5.0-py3-none-any.whl) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (>=2.3.1, <2.3.1+) DEBUG Searching for a compatible version of windows-curses{platform_system == 'Windows'} (>2.3.1, <2.3.1+) DEBUG No compatible version found for: windows-curses{platform_system == 'Windows'} DEBUG Searching for a compatible version of visidata (<2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==2.11 [compatible] (visidata-2.11-py3-none-any.whl) DEBUG Adding transitive dependency for visidata==2.11: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==2.11: python-dateutil* DEBUG Adding transitive dependency for visidata==2.11: windows-curses{platform_system == 'Windows'}* DEBUG Searching for a compatible version of visidata (<2.11 | >2.11, <2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==2.10.2 [compatible] (visidata-2.10.2-py3-none-any.whl) DEBUG Adding transitive dependency for visidata==2.10.2: python-dateutil* DEBUG Adding transitive dependency for visidata==2.10.2: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==2.10.2: windows-curses{platform_system == 'Windows'}* DEBUG Searching for a compatible version of visidata (<2.10.2 | >2.10.2, <2.11 | >2.11, <2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl.metadata DEBUG Selecting: visidata==2.10.1 [compatible] (visidata-2.10.1-py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/b7/1a/7e4798e9339adc931158c9d69ecc34f5e6791489d469f5e50ec15e35f458/zipp-3.21.0-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==2.10.1: importlib-metadata>=3.6 DEBUG Adding transitive dependency for visidata==2.10.1: python-dateutil* DEBUG Adding transitive dependency for visidata==2.10.1: windows-curses{platform_system == 'Windows'}* DEBUG Searching for a compatible version of visidata (<2.10.1 | >2.10.1, <2.10.2 | >2.10.2, <2.11 | >2.11, <2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==2.10 [compatible] (visidata-2.10-py2.py3-none-any.whl) DEBUG Prefetching 10 visidata versions DEBUG Found fresh response for: https://files.pythonhosted.org/packages/c4/7d/eeda1531b31e7479455ae32114fe17b1ef1ea8f4711224b4dd36be3bb3d1/visidata-2.10-py2.py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/12/1a/adc62b60b5a0bc58f2fd4fc8ab1fafdecdfc286f9276502e7450a36e88bb/visidata-2.8-py2.py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==2.10: python-dateutil* DEBUG Found fresh response for: https://files.pythonhosted.org/packages/1e/25/89cfab623f0409b92a915b868d527a593bd098e93de5cd7122c212cd8eca/visidata-2.7.1-py2.py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==2.10: importlib-metadata>=3.6 DEBUG Found fresh response for: https://files.pythonhosted.org/packages/de/02/39206a092234751435cfc7e7d7b23991b6f60223faa0f6b4abe09f164b0b/visidata-2.9-py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==2.10: windows-curses{platform_system == 'Windows'}* DEBUG Found fresh response for: https://files.pythonhosted.org/packages/1d/31/7be0a82718d8165946a434e92cd3be9c44f3d9efd9afb06aa9465eed0fd9/visidata-2.7-py2.py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/4f/2f/2ebe404f7250f2e42c0db4f99b2d2a4595832ae5326b634c7962180b2fa6/visidata-2.6-py2.py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/a5/b0/fb96fa6bbc5715f62acfb2917752cd8129a27a88104dc41421ffd142f779/visidata-2.9.1-py2.py3-none-any.whl.metadata DEBUG Searching for a compatible version of visidata (<2.10 | >2.10, <2.10.1 | >2.10.1, <2.10.2 | >2.10.2, <2.11 | >2.11, <2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/ac/a1/8ceea7ad26aefdfb844d2fe4f58b21362044897486308e2554a12836ffb8/visidata-2.4-py2.py3-none-any.whl.metadata DEBUG Selecting: visidata==2.9.1 [compatible] (visidata-2.9.1-py2.py3-none-any.whl) DEBUG Found fresh response for: https://files.pythonhosted.org/packages/78/89/23993b9757595405bfb3926b00920f8e89d297d1a2079bd51885fde799c0/visidata-2.5-py2.py3-none-any.whl.metadata DEBUG Found fresh response for: https://files.pythonhosted.org/packages/5a/0a/8fd72749c9f43efe0e7a8e6f648de3c225fb906e3b6911ed15cf5a95937d/visidata-2.6.1-py2.py3-none-any.whl.metadata DEBUG Adding transitive dependency for visidata==2.9.1: python-dateutil* DEBUG Adding transitive dependency for visidata==2.9.1: windows-curses{platform_system == 'Windows'}* DEBUG Searching for a compatible version of visidata (<2.9.1 | >2.9.1, <2.10 | >2.10, <2.10.1 | >2.10.1, <2.10.2 | >2.10.2, <2.11 | >2.11, <2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==2.9 [compatible] (visidata-2.9-py3-none-any.whl) DEBUG Adding transitive dependency for visidata==2.9: python-dateutil* DEBUG Adding transitive dependency for visidata==2.9: windows-curses{platform_system == 'Windows'}* DEBUG Searching for a compatible version of visidata (<2.9 | >2.9, <2.9.1 | >2.9.1, <2.10 | >2.10, <2.10.1 | >2.10.1, <2.10.2 | >2.10.2, <2.11 | >2.11, <2.11.1 | >2.11.1, <3.0 | >3.0, <3.0.1 | >3.0.1, <3.0.2 | >3.0.2, <3.1 | >3.1, <3.1.1 | >3.1.1) DEBUG Selecting: visidata==2.8 [compatible] (visidata-2.8-py2.py3-none-any.whl) DEBUG Adding transitive dependency for visidata==2.8: python-dateutil* DEBUG Searching for a compatible version of python-dateutil (*) DEBUG Selecting: python-dateutil==2.9.0.post0 [compatible] (python_dateutil-2.9.0.post0-py2.py3-none-any.whl) DEBUG Searching for a compatible version of six (>=1.5) DEBUG Selecting: six==1.16.0 [compatible] (six-1.16.0-py2.py3-none-any.whl) DEBUG Tried 19 versions: visidata 13, python-dateutil 3, importlib-metadata 2, six 1 DEBUG marker environment resolution took 0.204s Resolved 3 packages in 208ms DEBUG Running `vd t.csv` DEBUG Looking at `.dist-info` at: C:\Users\hwine\AppData\Local\uv\cache\archive-v0\mqiM0zcuf31NhjcDYG0qu\Lib\site-packages\python_dateutil-2.9.0.post0.dist-info DEBUG Looking at `.dist-info` at: C:\Users\hwine\AppData\Local\uv\cache\archive-v0\mqiM0zcuf31NhjcDYG0qu\Lib\site-packages\six-1.16.0.dist-info DEBUG Looking at `.dist-info` at: C:\Users\hwine\AppData\Local\uv\cache\archive-v0\mqiM0zcuf31NhjcDYG0qu\Lib\site-packages\visidata-2.8.dist-info DEBUG Looking at `.dist-info` at: C:\Users\hwine\AppData\Local\uv\cache\archive-v0\mqiM0zcuf31NhjcDYG0qu\Lib\site-packages\visidata-2.8.dist-info The executable `vd` was not found. warning: An executable named `vd` is not provided by package `visidata`. The following executables are provided by `visidata`: - vd - visidata.exe Consider using `uvx --from visidata ` instead. ```

N.B.: I played with this a bit, and this may be more of a "room for improved error message", and/or a bug in the upstream package.

Note:
to really use on windows The simplified example above is enough to show the issue. However, remember that there is no native ncurses implementation on windows. You can install one in the uvx or uv tool command with the --with windows-curses option. And adjust python version to get a viable version. E.g.:
uvx --from visidata --with windows-curses --python 3.11 visidata t.csv
FishAlchemist commented 1 week ago

To supplement, vd is just a Python script without .py.

#!C:\....\Scripts\python.exe

import visidata.main

if __name__ == '__main__':
    visidata.main.vd_cli()
zanieb commented 1 week ago

Hm interesting, thanks for all the details. I'm.. not sure what we should do here. Similar to https://github.com/astral-sh/uv/issues/8770#issuecomment-2453508632 these are declared using the legacy scripts interface. This goes beyond the idea in https://github.com/astral-sh/uv/issues/9151 but might be in scope for the spirit of that change.