Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python: should I check the virtualenv code into git?

Tags:

python

So I have a flask app under development using virtualenv. I have a tree like this:

./app - view, model, etc
./flask - virtualenv

Obviously app is managed by git. My question is: should I do the same with flask?

like image 729
lang2 Avatar asked Mar 17 '26 03:03

lang2


1 Answers

No, you don't put anything you can instead easily generate into the repository. And virtualenvs are tied to your system; you could not re-use it on another.

Store the requirements.txt file and a README showing how to create the virtualenv in git, and every time you need to set up for development on a new machine, create the virtualenv from scratch.

like image 151
Martijn Pieters Avatar answered Mar 19 '26 06:03

Martijn Pieters