Skip to content

Commit

Permalink
python requirements post
Browse files Browse the repository at this point in the history
  • Loading branch information
gdha committed Sep 16, 2024
1 parent 4c8b3e9 commit 4b4a4f7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions _posts/2024-09-16-python-requirements.md
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.

0 comments on commit 4b4a4f7

Please sign in to comment.