py-spy
py-spy copied to clipboard
"No python processes found" for Python 3.10 on Windows
The following command:
py-spy top -s -- py -3.10 script.py
Fails with Error: No python processes found in process 3872 or any of its subprocesses, while the script itself runs successfully.
If I instead run py-spy top -s -- py -3.9 script.py, it works perfectly.
Environment:
- Python 3.10.4
- Python 3.9.12
- py-spy 0.3.12
- Windows 11, build 10.0.22000
I'm also getting one of these, depending on how I try to run.
$ py-spy record -p <pid> -o <file>
Error: Failed to find a python interpreter in the .data section
$ py-spy record -s -p <pid> -o <file>
Error: No python processes found in process <pid> or any of its subprocesses
$ py-spy record -o <file> -- python main.py
Error: Failed to find python version from target process
$ py-spy record -s -o <file> -- python main.py
[ python program runs, but no py-spy output file is written upon interrupt ]
- Python 3.10.0 - 3.10.5
- py-spy 0.3.12
- Windows 10
I got a similar error:
(.venv) C:\project>py-spy top -- python gui.py
Error: Failed to find python version from target process
- Python 3.10.6
- py-spy 0.3.14
- Windows 10
Also seeing this with Python 3.10.11
I guess https://github.com/benfred/py-spy/issues/216 is relevant as well. I'm seeing same issue as https://github.com/benfred/py-spy/issues/216#issuecomment-1722555568 on python 3.11.9 in virtualenv.