py-spy icon indicating copy to clipboard operation
py-spy copied to clipboard

"Failed to find a python interpreter in the .data section"

Open xiewendan opened this issue 2 years ago • 6 comments

I use py-spy to run py by python3.11.3 on windows

py-spy record -o profile.svg -- python -c "import time;time.sleep(100)" Error: Failed to find a python interpreter in the .data section

operating system: windows py-spy version: 0.3.14 python version: 3.11.3

xiewendan avatar Jun 15 '23 03:06 xiewendan

I think the issue is that py-spy only supports Python versions up to 3.9. I tried it as well using 3.11.4 and got the same error.

akjroller avatar Jul 03 '23 03:07 akjroller

Thanks @akjroller for at least the temporary solution. I confirm that on python 3.9 it worked and on python 3.10 not. (Windows)

alispa avatar Dec 17 '23 21:12 alispa

I am also seeing this issue. If the program I want to profile is running in python 3.10 then I can't profile it with py-spy, but I can profile the same program running under python 3.7

image image

burrowsa avatar Feb 01 '24 12:02 burrowsa

This is a duplicate of https://github.com/benfred/py-spy/issues/643. Some solutions/workarounds can be found posted there.

aakash-sahai avatar Feb 29 '24 13:02 aakash-sahai

@aakash-sahai thanks for mentioning! But measured by creation time, #643 is a duplicate of this issue, also mentioned in https://github.com/benfred/py-spy/issues/643#issuecomment-1859271016.

fleimgruber avatar Feb 29 '24 14:02 fleimgruber

https://github.com/benfred/py-spy/pull/672 this might fix the problem. I need to test on an amd64 machine first.

akhramov avatar Jul 13 '24 23:07 akhramov