Forum in maintenance, we will back soon 🙂
Requirements doubt
hey sir mentioned about requiremnt python file inside vs code. So how will be come to know about requirements version we are using currently? So we have to use same version sir shown in lecture?
@kunal-lonhare you can see the versions of these when you do
pip freeze
it is usual to redirect the output from this command to a requirements.txt file.
pip freeze > requirements.txt
However, I consider it bad practice to have all of the output from "pip freeze" given in the requirements.txt file because it includes the dependencies of many packages like Flask. Therefore it's a good idea to be minimalistic in the requirements.txt file and only include the primary package and allow that package to give the end-user the dependencies when he installs your package and executes
pip install -r requirements.txt
You do need the versions of the primary packages in the requirements.txt file when posting to GitHub because future releases of the package may break your code and giving the versions helps to avoid this collision.
Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack