benfred / py-spy

Sampling profiler for Python programs
MIT License
12.14k stars 400 forks source link

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

Open xiewendan opened 1 year ago

xiewendan commented 1 year ago

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

akjroller commented 1 year ago

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.

alispa commented 6 months ago

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

burrowsa commented 5 months ago

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

aakash-sahai commented 4 months ago

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

fleimgruber commented 4 months ago

@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.