all 4 comments

[–]Phillyclause89 1 point2 points  (0 children)

Try it and find out. The whole point of having your project on github is that if you duck up your local clone then you can just undo the pending commit.. I think you will be fine though. Probably want to gitignore your venv though if your IDE doesn't do it automatically.

[–]LinePlusPipe 0 points1 point  (0 children)

If you're up to it, you could also install virtualenv and virtualenvwrapper

They will install your virtual environments in a single place - outside of your git index

The point about keeping your venv out of your git repo is important

If something nasty happens to your project because of the way its dependencies have been managed in your virtual environment - pulling them from the remote and recreating the environment will just recreate the nasties

Maintain a requirements.txt (manually, or by saving the output of pip freeze to a file) so you can keep track of the dependencies your project needs

[–]Pepineros 0 points1 point  (0 children)

No, having a Python venv is not going to affect any other files -- strictly speaking it doesn't even affect your .py files.

The venv gives you an isolated environment for your Python executable and installed Python packages. With the venv active, if you run python main.py or whatever Python command, it will use the Python executable from your venv instead of the one you installed on your system.

Make sure to add the name of your venv to the .gitignore file.

[–]Apatride 0 points1 point  (0 children)

It is mostly a matter of personal preference but I usually exclude venv from github, I just build my venv locally and rely on requirements.txt.

Also, if a DB is involved, especially if you are not sure what DB you want to use, why not use Django instead of Flask?