-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
layout: post | ||
title: How to create a requirements.txt file of your python project? | ||
|
||
description: How to create a requirements.txt file of your python project | ||
|
||
tags: [Open Source, python, it3 consultants, requirements.txt ] | ||
author: gratien | ||
--- | ||
|
||
<strong>How to create a requirements.txt file of your python project?</strong> | ||
|
||
To get all installed modules or packages is by going to your virtual environment directory | ||
on the terminal and run the command: | ||
|
||
```bash | ||
pip3 freeze > requirements.txt | ||
``` | ||
|
||
Another method, is by installing `pipreqs` package, e.g. `pip3 install pipreqs` | ||
|
||
Then, it is as easy as: | ||
|
||
```bash | ||
cd $HOME/project/to/your/python/project | ||
pipreqs . | ||
``` | ||
|
||
As a result a `requirements.txt` file will be created in your python project directory. | ||
|