Need different package versions for two Python projects? Installing packages systemwide makes the projects share them: upgrading a package for one project may break the other. A virtual environment gives each project an isolated directory tree for its Python tools and dependencies, so each can use the package versions it needs. section 14.1.1
Create and activate an environment
From the project directory, run `$ python3 -m venv taskier-env` (on Windows, use `python` if needed). This creates a folder named `taskier-env`. Activate it with `source taskier-env/bin/activate` on macOS or `taskier-env\Scripts\activate.bat` on Windows. The environment name appearing in the command prompt signals that it is active. Name the environment so its project is easy to recognize. section 14.1.2 section 14.1.3
Install a project dependency
With the environment active, run `pip install streamlit==1.10.0` to install the version used for the task-management web app. Pinning that version helps reproduce the setup; the installation belongs to this environment rather than being shared across projects. section 14.1.3
In Visual Studio Code, open the project folder, run `Python: Select Interpreter`, and choose the environment’s interpreter. Check the status bar to verify the selected environment and Python version. Open the project folder itself if the environment does not appear in the interpreter list. section 14.1.4
Choose the tool according to what must vary. The standard-library `venv` module handles project-specific packages but uses the systemwide Python by default. If projects also need distinct Python versions, conda can create an environment with a specified interpreter and dependencies: `conda create -n taskier-env python=3.10.4 streamlit=1.10.0`. Activate it with `conda activate taskier-env`, then select its interpreter in Visual Studio Code. section 14.1.5






