Skip to content

🐍 Venv Script¢

This script automates the creation of a Python virtual environment, installs dependencies from requirements.txt, and builds the MkDocs documentation site. It is intended for use on Windows systems (using venv/Scripts/activate).


πŸ“‘ FeaturesΒΆ

  • Creates a Python virtual environment in the venv directory
  • Installs dependencies from requirements.txt
  • Builds the MkDocs documentation site with verbose output
  • Installs MkDocs if not already present

venv.sh
1
2
3
4
5
6
#!/bin/bash

python3 -m venv venv # (1)!
source venv/Scripts/activate # (2)!
pip install -r config/requirements.txt # (3)!
mkdocs build --verbose # (4)!
  1. β†’ Creates Python virtual environment in venv folder
  2. β†’ Activates the environment using Windows path
  3. β†’ Installs all dependencies from requirements file
  4. β†’ Builds MkDocs documentation with detailed output

πŸš€ UsageΒΆ

sh assets/scripts/venv.sh
  • Run in the project root directory
  • Make sure python3 and pip are installed

⚠️ Notes¢

  • The script uses Windows-style activation (venv/Scripts/activate)
  • Adjust the activation path for Unix systems if needed

πŸ”— ReferencesΒΆ

Share on Social Media