Through the efforts of @dandroid@dandroid.app, the lemmy-safety tool can now run via docker, which should help you run it without having to mess with python on your end.
For those who don’t remember, lemmy-safety is a script you can read to clean up your pict-rs images from potential CSAM.
I was getting this error with docker-desktop installed, but it worked after purging and installing docker-ce instead, and running with the
--gpus all
command.