Fix Python – Is it bad to have my virtualenv directory inside my git repository?

Question

Asked By – Lyle Pratt

I’m thinking about putting the virtualenv for a Django web app I am making inside my git repository for the app. It seems like an easy way to keep deploy’s simple and easy. Is there any reason why I shouldn’t do this?

Now we will see solution for issue: Is it bad to have my virtualenv directory inside my git repository?


Answer

I use pip freeze to get the packages I need into a requirements.txt file and add that to my repository. I tried to think of a way of why you would want to store the entire virtualenv, but I could not.

This question is answered By – RyanBrady

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0