Skip to content

Forum in maintenance, we will back soon 🙂

Requirements doubt
 
Notifications
Clear all

Requirements doubt

2 Posts
2 Users
1 Reactions
293 Views
(@kunal-lonhare)
Posts: 28
Eminent Member Customer
Topic starter
 

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?

Screenshot 2023 10 15 at 20.09.23
 
Posted : 10/15/2023 4:54 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@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

 
Posted : 10/16/2023 2:28 pm
Share: