Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Interaction with tox #211

Closed
Closed
Labels
questionFurther information is requested
@clint-lawrence

Description

@clint-lawrence

tox doesn't passLOCALAPPDATA to subcommands by default, so when callingpy.exe from a tox command, it can't find any runtimes, even when they are installed.

I'm planning to raise in issue on the tox project to pass that env var on windows. Is there is anything else that is needed to ensure tox and py.exe work correctly together?

Background

Installed using version 20.1b1 as documented herehttps://www.python.org/downloads/release/pymanager-251b1/

Details

I have a python script that is called by tox. This script callspy.exe with a specific python version set. Running this script directly withpy.exe works fine as expected. Something like:

importsubprocesssubprocess.run(["py.exe","-V:3.12","-c","pass"],check=True)

And a tox file

[testenv]commands =    python call_py.py

When running tox, the subprocess call topy.exe fails with following error.

❯ uvx toxpy: commands[0]> python call_py.py[ERROR] No runtime installed that matches 3.12. Try running "py install 3.12".Traceback (most recent call last):  File "C:\Users\clawrence\dev\pymanager\call_py.py", line 3, in <module>    subprocess.run(["py.exe", "-V:3.12", "-c", "pass"], check=True)  File "C:\Users\clawrence\AppData\Roaming\uv\python\cpython-3.10.18-windows-x86_64-none\lib\subprocess.py", line 526, in run    raise CalledProcessError(retcode, process.args,subprocess.CalledProcessError: Command '['py.exe', '-V:3.12', '-c', 'pass']' returned non-zero exit status 2684354566.py: exit 1 (0.80 seconds) C:\Users\clawrence\dev\pymanager> python call_py.py pid=19416  py: FAIL code 1 (1.08=setup[0.28]+cmd[0.80] seconds)  evaluation failed :( (1.16 seconds)~\dev\pymanager via 🐍 v3.14.0 (installer) took 3s❯ py -V:3.12 -c "pass"~\dev\pymanager via 🐍 v3.14.0 (installer)❯ py call_py.py~\dev\pymanager via 🐍 v3.14.0 (installer)❯

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp