gitignore for a python venv based in the root of a git project

  git, python

I’m setting up a python project in git and the I want to run the project in a venv. I’m running python3 -m venv . in the root of the git repo.

This creates multiple directories and a file:

  • bin
  • include
  • lib
  • lib64
  • share
  • pyenv.cfg

Which of these files and folders are import to my colleagues to set up the environment in the same way I did? In the root of the project I’ve also included this script to set up:

python3 -m venv .
source bin/activate
pip3 install -r requirements.txt

Source: Python Questions

One Reply to “gitignore for a python venv based in the root of a git project”

  • I think that all the files that was created with venv. I used this:
    “`
    # Virtualenv
    .Python
    [Bb]in
    [Ee]tc
    [Ii]nclude
    [Ll]ib
    [Ll]ib64
    [Ll]ocal
    [Ss]cripts
    [Ss]hare
    pyvenv.cfg
    .venv
    pip-selfcheck.json
    “`

LEAVE A COMMENT