To ensure consistent dependency management and avoid conflicts with system-wide Python packages, we need to create and configure a virtual environment for the project.
Acceptance Criteria:
A virtual environment is created within the project directory.
The virtual environment is named .venv.
The .venv directory is added to .gitignore to prevent it from being committed to the repository.
A clear command or set of instructions is provided in the README.md file for activating the virtual environment (Windows, macOS, and Linux).
The project's dependencies are saved to a requirements.txt file using pip freeze > requirements.txt.
Tasks:
[x] Create a virtual environment using python -m venv .venv.
[x] Update .gitignore to include .venv/.
[x] Activate the virtual environment and verify it works as expected:
source .venv/bin/activate (macOS/Linux)
.venv\Scripts\activate (Windows)
[x] Generate a requirements.txt file.
[x] Update the README.md with instructions on setting up and using the virtual environment.
Notes:
Use Python 3.9 or later for compatibility with the project.
To ensure consistent dependency management and avoid conflicts with system-wide Python packages, we need to create and configure a virtual environment for the project.
Acceptance Criteria:
.venv
..venv
directory is added to.gitignore
to prevent it from being committed to the repository.README.md
file for activating the virtual environment (Windows, macOS, and Linux).requirements.txt
file usingpip freeze > requirements.txt
.Tasks:
python -m venv .venv
..gitignore
to include.venv/
.source .venv/bin/activate
(macOS/Linux).venv\Scripts\activate
(Windows)requirements.txt
file.README.md
with instructions on setting up and using the virtual environment.Notes: