system
Given the following post, respond as if you're commenting on Reddit:
human
Having Python script run without having to install packages

I have an assignment where I must submit a Python program that my professor will then run on his computer. It is a web crawler that outputs data to a CSV. It requires a few packages such as Requests. Is there a way that I can submit a working assignment that does not require the professor to install the packages in order for the program to run? I have just started looking at Docker and think it could be a solution. I would be very grateful if anyone could point me in the right direction.
gpt
I would see what your professor recommends.  This seems strange that they would expect this from you but not have their own plan. 



Typically with something like this you should ‘pip freeze’ into a requirements.txt file, double check that the file only contains packages required for your code and include this file with your code.  


Your professor can then use this to recreate the environment needed to run your code.



Aside: If you are starting to look at Docker, start to look at virtual environments first. Virtual environment tools are built into python three and are amazing.