For this you will need the twitter API https://developer.twitter.com/
after answering the questions (it may take a while), retrieve your key and token, put them in the code.
after that install the requirements, use the command >>> pip freeze> requirements. txt https://pip.pypa.io/en/stable/reference/pip_freeze/