If you want to specify requirements during project export then setting requirements.txt can be great saviour when working with Python project.


You can setup requirements file anywhere but if you are using Virtual Environment it is awesome to consider for better project management.


If you want to know more about virtual environment in Python then follow below link




Create requirement file (On project you want to export dependencies)


$ pip freeze > requirements.txt


Install using requirement file (On project you want to import dependencies)


$ pip install -r requirements.txt



Pro Tip: If you structure project with follwing structure in python it is always handy


- Project_Directory (main project directory)

  |- lib (your project library)

  |- resources (your project resources)

  |- src (your project source)

  |- venv (your virtual environment)