Edit:
You could start by adding a requirements.txt
to your project, although this is outdated advice if you want to build a package, but will be fine for small projects. If you want to build a package, take a look at this documentation about PEP517: https://peps.python.org/pep-0517/
You can also use other build tools to build packages like https://github.com/python-poetry/poetry
This shell command will export your projects dependencies as a file named requirements.txt:
pip freeze > requirements.txt
Once you’ve got your requirements file, you can head over to a different computer or new virtual environment and run the following:
pip install -r requirements.txt
A requirements file is a list of all of a project’s dependencies. This includes the dependencies needed by the dependencies. It also contains the specific version of each dependency, specified with a double equals sign (==).
Read more here: https://realpython.com/lessons/using-requirement-files/