Run the below command to get the fan running.
sudo systemctl enable pigpiod
sudo sed -i '$ i sudo pigpiod' /etc/rc.local
sudo python /home/admin/xscript/fan.py &
But when you reboot the device, the PWM fans won't run unless you run the above command again,