I am working on a research project where we need to run stockfish on hundreds of thousands of pgns we have collected. We need to extract all information generated from stockfish like centipawns, inaccuracies, blunders, mistakes, etc. I know you can download stockfish .exe and some gui to use it with. But we need to run it on large number of existing pgns in an automated manner preferably using python.
Download Stockfish form official website. Note that there are different versions for different cpus - pick first one that works.
For distributed analysis Lichess developed Fishnet which is open source. Maybe you can adapt it for your needs?