Virtual Environments
Virtual environments allow you to isolate your project's Python dependencies from your system-wide Python installation.
Creating a Virtual Environment
When creating a new PyPositron project, you can choose to create a virtual environment. If you didn't create one during project setup, you can create it later using the following command:
positron venv
Activating a Virtual Environment
To activate your project's virtual environment, run:
On Linux/Mac:
source linuxvenv/bin/activate
On Windows:
winvenv\Scripts\activate
Installing Dependencies
To install Python packages in your project's virtual environment, use the positron install
command:
positron install <library_name>
Managing Dependencies
Dependencies for your project are typically listed in requirements.txt
. You can install all dependencies using:
pip install -r requirements.txt