benfred / py-spy

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

Unsupported version of Python: 3.10.0 #603

Closed angusholder closed 10 months ago

angusholder commented 10 months ago

I'm trying to use py-spy 0.3.14 (which says it supports Py 3.10), and get this error:

> sudo py-spy top --pid 893751
Error: Unsupported version of Python: 3.10.0

My program is running on Ubuntu 22.04 with its standard Python 3.10.6 under a virtual env:

> venv/bin/python -V
Python 3.10.6

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

The one interesting thing about my setup is that I'm using gevent, could that be related?

gevent==22.10.2
greenlet==2.0.2
angusholder commented 10 months ago

Fixed; it was a path issue:

When running py-spy with sudo, it was finding an older version of py-spy I had installed elsewhere. I didn't notice, because I was checking what version of py-spy I was using by running py-spy --version without sudo 🤦‍♂️