Pass Sensor value to Python Script, process it and return back as another Sensor value

I don’t know anything about “Python Executor”.

If you installed Home Assistant Supervised in a virtual machine, the python-aqi library must be installed in the homeassistant docker container. If you are installing the library in the host operating system, Home Assistant cannot access it.

Which installation method did you use?