Estou com um problema ao tentar usar uv run
com os.exec
variantes do Python. Algum conselho sobre como fazer isso funcionar?
Bash, Ubuntu WSL, uv run python
, execlp
, uv 0.6.5
:
$ uv run python
Python 3.12.9 (main, Feb 12 2025, 14:50:50) [Clang 19.1.6 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.execlp("uv", "run", "python")
Manage Python versions and installations
Usage: run python [OPTIONS] <COMMAND>
(rest of the help text here)
Powershell, Windows 11, uv run main.py
, execv
, uv 0.6.10 (f2a2d982b 2025-03-25)
:
PS > uv run python
Python 3.12.9 (main, Mar 17 2025, 21:06:20) [MSC v.1943 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.execv(r"C:\Users\username\.local\bin\uv.exe", ["run", "main.py"])
PS > error: unrecognized subcommand 'main.py'
Usage: run [OPTIONS] <COMMAND>