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?
In order to get the simplest dependency requirements file, you'd better use a virtualenv for all the development. But the directories created by virtualenv, e.g., bin , lib , src , are better not to put into git repos and not to write into .
The new package should get installed in the virtual environment folder. Check the virtual environment folder inside lib64/python3.
No Its not necessary to upload virtualenv file on github. and even some time when you push your code to github then it ignore python file only if add into ignore.
Yes, this should be possible if you haven't done anything that depends on the current directory of the virtualenv. However, if you have the choice, the best thing to do is to create new virtualenv and start using the new virtualenv instead.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With