Recommended Software

What to install, in what order, and how to check it works

What you need

Tool Minimum version Why
Stata 19+ MP runs the Stata code
Positron latest the AI-enhensed editor for Stata and more (R, Quarto, Git, Python)
Git for Windows 2.52+ version control, and gives you Git Bash as your terminal
Python 3.13+ backend the Stata-for-Positron extension runs on + data science
uv latest Python package manager the same extension needs
R 4.5+ post-simulation analysis and charts

Quarto 1.9+ only if you edit this site or write .qmd reports.

Positron is the recommendation. If you already live in VS Code see the fallback section below — but don’t install VS Code just for MML work.

Install on a World Bank laptop

Everything comes from the WB software center, no permissions required.

Python must come from the Software Center (package AWBG10201.4 or later) so it lands in C:\WBG\Python313\. If you already have an older Python, ask IT Help to uninstall it first — the extension will not find the right one otherwise.

Install on a private laptop

Install uv

Open Git Bash: press Windows, type git bash, hit Enter.

which python      # expect /c/WBG/Python313/python.exe
python --version  # expect 3.13 or later
pip install uv
uv --version

If which python points anywhere else, fix that before continuing — the Stata console in Positron will not start otherwise.

Wire Stata into Positron

What you get:

  • a Stata console inside Positron
  • a data viewer
  • plots
  • more than one Stata session at a time

Works with Stata 18+. Source: https://github.com/ntluong95/positron-stata.

Optional: randrescastaneda.stataglow for Stata syntax highlighting.

Git inside Positron

Nothing to install and no second application to learn: because Positron is built on VS Code, it ships the same Source Control view. Open a folder that is a Git repository and press Ctrl+Shift+G — you get staging, commits, push and pull, branch switching, side-by-side diffs, and conflict resolution, next to the do-file you are editing.

It needs Git for Windows installed (above), which is why Git is in the install order.

GitHub Desktop is also in the Software Center, but you do not need it if you work in Positron.

Check it works

sysuse auto
summarize price
display "Stata is working!"

Logging inside Positron

WarningTwo Stata habits to change

Use capture log using <filename>, not log using <filename>. Plain log using conflicts with how the extension captures output.

Never cap log close _all. It breaks the extension’s output capture. Close logs one at a time.

Already on VS Code?

The Stata route in VS Code is the DeepEcon.stata-mcp extension — older and well-established, but no data viewer and one session at a time.

Positron remains the MML recommendation. Don’t install VS Code just for this.

When it doesn’t work

Symptom Fix
Stata console does not start uv is missing — install it (see above), then restart Positron.
Stata console still does not start Positron was blocked from setting up its Python environment. In Git Bash run pip install -r "C:\Users\wbXXXXXX\.positron\extensions\ntluong95.positron-stata-0.1.1-universal\python\requirements.txt", then restart Positron.
“No stata runtime is available” positron.stata.installationPath is unset or wrong. Check the exact setting name — other Stata extensions use different keys.
Positron not in the Start menu Check C:\Users\wbXXXXXX\AppData\Local\Programs\Positron\ and pin Positron.exe yourself.
Positron uninstalls itself after a restart Windows → “ED Version” → uninstall Positron → restart → reinstall from the Software Center.
Python not found Install it from the Software Center and confirm which python returns /c/WBG/Python313/python.exe.

Anything still broken — . Report extension bugs at https://github.com/ntluong95/positron-stata/issues.

For the Copilot side of the setup, see AI-assisted coding.