Repo init Python requirements #23

Closed
opened 2024-07-05 18:38:03 +00:00 by bauljamic123arlijam · 2 comments

It's best practise to have a requirements.txt file for Python dependency tracking.

It's used so everyone has the same project environments in terms of libraries used and also their respective versions, plus you don't have to go trough all the files and find missing imports when cloning (for the first time I guess).

pip list --format=freeze > requirements.txt

Outputs a requirements.txt file that contains all third party Python libraries used in the repo.

When cloning repo, run the commands:

python -m venv venv

to create a virtual environment

pip list --format=freeze > requirements.txt

to install the required third party libraries.

This way everything works out of the box :)

It's best practise to have a requirements.txt file for Python dependency tracking. It's used so everyone has the same project environments in terms of libraries used and also their respective versions, plus you don't have to go trough all the files and find missing imports when cloning (for the first time I guess). `pip list --format=freeze > requirements.txt` Outputs a requirements.txt file that contains all third party Python libraries used in the repo. When cloning repo, run the commands: `python -m venv venv` to create a virtual environment `pip list --format=freeze > requirements.txt` to install the required third party libraries. This way everything works out of the box :)
Owner

Why was this closed? @bauljamic123arlijam

Why was this closed? @bauljamic123arlijam
Owner

I would reopen it and merge the changes

I would reopen it and merge the changes
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Decentrala/website#23
No description provided.