Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 not supported #661

Closed
nicolargo opened this issue Apr 28, 2024 · 5 comments
Closed

Python 3.12 not supported #661

nicolargo opened this issue Apr 28, 2024 · 5 comments

Comments

@nicolargo
Copy link

On my fresh Ubuntu 24.04 install:

sudo env "PATH=$PATH" ./venv-dev/bin/py-spy record --pid 66778
Error: Unsupported version of Python: 3.12.0

Is it plan to support Python 3.12 ?

@potoo0
Copy link

potoo0 commented Apr 29, 2024

Additional debugging info (RUST_LOG=info py-spy record --pid 1182335)

[2024-04-29T02:08:16.589266775Z INFO  py_spy::config] Command line args: ArgMatches { args: {}, subcommand: Some(SubCommand { id: [hash: FA6893386E553029], name: "record", matches: ArgMatches { args: {[hash: CD5160AB4406C427]: MatchedArg { occurs: 1, source: Some(CommandLine), indices: [2], type_id: Some(TypeId { t: 15469221632486072992 }), vals: [[AnyValue { inner: TypeId { t: 15469221632486072992 } }]], raw_vals: [["1182335"]], ignore_case: false }, [hash: 66D7DFD73E3FE4B7]: MatchedArg { occurs: 0, source: Some(DefaultValue), indices: [3], type_id: Some(TypeId { t: 15469221632486072992 }), vals: [[AnyValue { inner: TypeId { t: 15469221632486072992 } }]], raw_vals: [["flamegraph"]], ignore_case: true }, [hash: BD514D8BE9BFDED6]: MatchedArg { occurs: 0, source: Some(DefaultValue), indices: [4], type_id: Some(TypeId { t: 15469221632486072992 }), vals: [[AnyValue { inner: TypeId { t: 15469221632486072992 } }]], raw_vals: [["unlimited"]], ignore_case: false }, [hash: AAFAF59EB7E2AC8]: MatchedArg { occurs: 0, source: Some(DefaultValue), indices: [5], type_id: Some(TypeId { t: 15469221632486072992 }), vals: [[AnyValue { inner: TypeId { t: 15469221632486072992 } }]], raw_vals: [["100"]], ignore_case: false }}, subcommand: None } }) }
[2024-04-29T02:08:16.596080584Z INFO  py_spy::python_spy] Got virtual memory maps from pid 1182335:
[2024-04-29T02:08:16.610942304Z INFO  py_spy::python_spy] Getting version from python binary BSS
[2024-04-29T02:08:16.611635008Z INFO  py_spy::python_spy] Failed to get version from BSS section: failed to find version string
[2024-04-29T02:08:16.611643462Z INFO  py_spy::python_spy] Trying to get version from path: /usr/local/mambaforge/envs/gpt/bin/python3.12
[2024-04-29T02:08:16.611648132Z INFO  py_spy::python_spy] python version 3.12.0 detected
[2024-04-29T02:08:16.611653183Z INFO  py_spy::python_spy] Failed to get interp_head from symbols, scanning BSS section from main binary
[2024-04-29T02:08:16.613659274Z INFO  py_spy::python_spy] Failed to connect to process, retrying. Error: Unsupported version of Python: 3.12.0
[2024-04-29T02:08:16.637244079Z INFO  py_spy::python_spy] Got virtual memory maps from pid 1182335:
[2024-04-29T02:08:16.649956194Z INFO  py_spy::python_spy] Getting version from python binary BSS
[2024-04-29T02:08:16.649970063Z INFO  py_spy::python_spy] Failed to get version from BSS section: failed to find version string
[2024-04-29T02:08:16.649974153Z INFO  py_spy::python_spy] Trying to get version from path: /usr/local/mambaforge/envs/gpt/bin/python3.12
[2024-04-29T02:08:16.649978538Z INFO  py_spy::python_spy] python version 3.12.0 detected
[2024-04-29T02:08:16.649982877Z INFO  py_spy::python_spy] Failed to get interp_head from symbols, scanning BSS section from main binary
[2024-04-29T02:08:16.651860942Z INFO  py_spy::python_spy] Failed to connect to process, retrying. Error: Unsupported version of Python: 3.12.0
[2024-04-29T02:08:16.675272893Z INFO  py_spy::python_spy] Got virtual memory maps from pid 1182335:
[2024-04-29T02:08:16.686990383Z INFO  py_spy::python_spy] Getting version from python binary BSS
[2024-04-29T02:08:16.687005220Z INFO  py_spy::python_spy] Failed to get version from BSS section: failed to find version string
[2024-04-29T02:08:16.687009988Z INFO  py_spy::python_spy] Trying to get version from path: /usr/local/mambaforge/envs/gpt/bin/python3.12
[2024-04-29T02:08:16.687013634Z INFO  py_spy::python_spy] python version 3.12.0 detected
[2024-04-29T02:08:16.687018102Z INFO  py_spy::python_spy] Failed to get interp_head from symbols, scanning BSS section from main binary
[2024-04-29T02:08:16.688877808Z INFO  py_spy::python_spy] Failed to connect to process, retrying. Error: Unsupported version of Python: 3.12.0
[2024-04-29T02:08:16.712299860Z INFO  py_spy::python_spy] Got virtual memory maps from pid 1182335:
[2024-04-29T02:08:16.723979518Z INFO  py_spy::python_spy] Getting version from python binary BSS
[2024-04-29T02:08:16.723990905Z INFO  py_spy::python_spy] Failed to get version from BSS section: failed to find version string
[2024-04-29T02:08:16.723994771Z INFO  py_spy::python_spy] Trying to get version from path: /usr/local/mambaforge/envs/gpt/bin/python3.12
[2024-04-29T02:08:16.723998152Z INFO  py_spy::python_spy] python version 3.12.0 detected

...

Error: Unsupported version of Python: 3.12.0

@kakkoyun
Copy link

kakkoyun commented May 1, 2024

Duplicate of #633

@olejorgenb
Copy link

olejorgenb commented May 22, 2024

Probably not very helpful, but https://github.com/plasma-umass/scalene and pyinstrument (both sampling profilers) support python 3.12 now. Maybe possible to get hints of how to resolve some of the issues there.

joerick/pyinstrument#246

Couldn't find the exact commits/PR for scalene

EDIT: https://github.com/P403n1x87/austin support 3.12 as well (this seems to be the best replacement to me since its model appear to be very similar to py-spy)

@Tsvetk
Copy link

Tsvetk commented Jul 6, 2024

> python -V
Python 3.12.3
> py-spy record -o profile-st3.svg -s python -- -c "print(23123)"
23123
Error: No python processes found in process 180942 or any of its subprocesses
>  py-spy record -o profile-st3.svg  python -- -c "print(23123)"
23123
Error: Failed to get process executable name. Check that the process is running.
Reason: No such file or directory (os error 2)
Reason: No such file or directory (os error 2)

@zanieb
Copy link
Contributor

zanieb commented Oct 15, 2024

Closed by #642

@benfred benfred closed this as completed Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants