- Python 3.x installed
The virtual environment has already been created and packages installed. The environment is located in the venv/ directory.
source setup_env.shThis will activate the virtual environment and set the PYTHONPATH correctly.
Windows (Command Prompt):
venv\Scripts\activate
set PYTHONPATH=%cd%\gtasks_cli\srcWindows (PowerShell):
venv\Scripts\Activate.ps1
$env:PYTHONPATH = "$pwd\gtasks_cli\src"macOS/Linux:
source venv/bin/activate
export PYTHONPATH=/Users/int/Documents/workspace/projects/gtasks_automation/gtasks_cli/srcNote: On macOS/Linux, you may need to update the path in the command above to match your actual project location.
After activating the environment, you can run scripts directly:
Windows:
python gtasks_cli/list_task_lists.py
python gtasks_cli/list_tasks_direct.pymacOS/Linux:
python gtasks_cli/list_task_lists.py
python gtasks_cli/list_tasks_direct.pyIf you need to install new packages, make sure you're in the virtual environment and then:
pip install package_nameTo update the requirements.txt file:
pip freeze > requirements.txtTo deactivate the virtual environment:
Windows/macOS/Linux:
deactivate