Typefully

Manage required ๐Ÿ Python packages with requirements.txt

Avatar

Share

ย โ€ขย 

3 years ago

ย โ€ขย 

View on X

Manage required ๐Ÿ #Python packages with requirements.txt ๐Ÿงต
"Requirements files" are files containing a list of items to be installed using pip install / A requirements.txt file is a file that lists all of the dependencies for a project.
> It allows you to easily install all the dependencies for your project in one go ๐Ÿš€ . > It makes it easy to share your project with others, as they can simply install all the dependencies from the requirements.txt file. > It can help you avoid dependency hell.
The pip freeze command is used to output all of the installed packages in requirements format. [ x.y.z -> package versions ]
You can install the same dependencies on another system by running pip install -r requirements.txt The -r flag tells pip to read the requirements.txt file and install all the dependencies listed in that file.
Listen to @calvinhp talk on "Tools for Setting Up Python on a New Machine" | @realpython podcast [00:22:38] Creating "requirements.txt" files and moving from pipenv to piptools youtu.be/3JxhdzWCMjU?t=1358
$ pip install like retweet share $ pip install --user @dotaadarsh #Python #100DaysOfCode
Avatar

Aadarsh

@dotAadarsh

Tech. Music. Cinema.