First, edit the .ini file with your lemmy servers, usernames and passwords.
Then make sure you have python interpreter with requests installed. You can check this with python3 -m pip show requests. if it says something like package not found, you should look into how to install python requests on your operatation system. If you downloaded it from python.org, python3 -m pip install --user requests should work.
Then you can do python3 lemmy-migrate.py -c config.ini. Let me know if you run into any problems!