📦 Installation
HBSIR is a Python library published on PyPI, which means it can be installed
in several ways and used in different workflows.
In this tutorial, we’ll focus on using uv — a fast, all-in-one tool for
managing Python environments and packages.
uv makes it simple to install and organize Python projects without worrying
about system settings or dependencies.
🧰 Installing uv
uv can be installed with a single command:
After installation, you can verify that it works by running:
For more details, troubleshooting tips, or advanced options, visit the official
uv installation guide.
🪄 Setting Up Your Project Directory
Follow these steps to create your working folder and install HBSIR using uv.
-
Create a new directory for your project and move into it:
-
Initialize a Python environment inside this folder:
This command creates a lightweight virtual environment so that your project has its own isolated Python setup.
-
Add
HBSIRto your environment:After this step, HBSIR is ready to use in Python scripts.
🧮 Optional: Add Notebook Support
If you prefer using interactive notebooks (similar to Stata’s data browser or do-file interface), you can install one of these variants:
Then simply create a new file with the .ipynb extension inside your project folder. When you open it in Visual Studio Code, the Python and Jupyter extensions will detect it automatically.