You will install a Python stack, a code editor, a terminal AI agent, and the keys that let them talk to a model. Here is how the pieces fit together.
--version command). If the check fails, fix it before moving on — later steps depend on earlier ones.gh — these get their own section (§6).
Get the installer from anaconda.com/download. Pick the build that matches your machine.
.exe installer and accept the defaults. Afterwards use the Anaconda Prompt (Start menu) for conda commands.
.pkg installer. Choose the Apple Silicon build on M-series Macs, the Intel build otherwise.
.sh script, then run it:
bash ~/Downloads/Anaconda3-2024.10-1-Linux-x86_64.shAnswer
yes to run conda init.
conda --version python --versionYou should see a conda version and Python 3.x.
docs.conda.io) instead — same conda command, without the bundled GUI apps.
An environment is an isolated, named Python installation with its own set of packages. Different projects need different — often conflicting — library versions; environments keep each project's dependencies in their own sealed box so they never clash.
conda activate llmfin # switch this terminal INTO the env; prompt shows (llmfin) python gen_king_analogy.py # ...now plain python uses the env's interpreter conda run -n llmfin python gen_king_analogy.py # run ONE command in the env, no activation
python? Bare python runs whichever interpreter is first on your PATH — usually base or the system Python, which lack the course libraries. You'd hit ModuleNotFoundError: No module named 'gensim'. Activating (or conda run) guarantees the right interpreter.conda env list — the * marks the active one — or check the (llmfin) tag at the start of your prompt.Create an isolated environment named llmfin, then install the course requirements into it. Run these from the course folder (next section shows how to get it).
conda create -n llmfin python=3.11 conda activate llmfin pip install -r code/requirements.txt pip install -e code/
requirements.txt pulls numpy, pandas, matplotlib, scikit-learn, jupyter, gensim, yfinance and more.pip install -e code/ installs the course's own llmfin helper package in editable mode.python -m ipykernel install --user --name llmfin --display-name "Python (llmfin)"Now notebooks can run on the Python (llmfin) kernel.
.exe, or:
winget install Microsoft.VisualStudioCode
brew install --cask visual-studio-code
sudo apt install ./code_*.deb # Debian/Ubuntu sudo dnf install ./code-*.rpm # Fedora/RHEL
code command (handy)Cmd+Shift+P) → Shell Command: Install 'code' command in PATH. Then code . opens the current folder. Windows and Linux installers add it for you.
Open the Extensions view (Ctrl+Shift+X, or Cmd+Shift+X on macOS), type each name in the search box, and click Install. The exact marketplace IDs:
| Extension | Publisher | Marketplace ID | What it does |
|---|---|---|---|
| Python | Microsoft | ms-python.python | Run/debug Python, pick interpreters |
| Jupyter | Microsoft | ms-toolsai.jupyter | Run .ipynb notebooks in the editor |
| Claude Code | Anthropic | anthropic.claude-code | Claude as a panel in VS Code (sign in — no API key; needs VS Code 1.98+) |
| Cline | Cline Bot | saoudrizwan.claude-dev | Autonomous AI coding agent (see §4) |
code --install-extension ms-python.python code --install-extension ms-toolsai.jupyter code --install-extension anthropic.claude-code code --install-extension saoudrizwan.claude-dev(The
code command comes from the VS Code install in §2.)
Ctrl/Cmd+Shift+P → Python: Select Interpreter → choose llmfin. When you open a notebook, click Select Kernel → Python (llmfin).
Get the LTS build from nodejs.org/en/download. The npm route for Claude Code needs Node 18 or later — LTS is well above that.
.msi installer (or use winget / Chocolatey).
brew install node
node --version npm --version
curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex
sudo:
npm install -g @anthropic-ai/claude-code
claude --version claude doctor
Open a terminal inside the project folder you want to work on and run:
claude
You already installed Cline (saoudrizwan.claude-dev) in §02. It is an autonomous agent that can create/edit files and run commands — with your approval at each step.
Your code (or Cline) sends a request plus your secret key; the provider checks the key, runs the model, and bills your account.
console.anthropic.com and add billing credits.sk-ant-api03-... and is shown only once.ANTHROPIC_API_KEY (the Anthropic SDK and tools read this automatically):export ANTHROPIC_API_KEY="sk-ant-api03-..."Add that line to
~/.zshrc or ~/.bashrc to make it permanent.
setx ANTHROPIC_API_KEY "sk-ant-api03-..."Then open a new terminal so the variable is picked up.
pip install anthropic
anthropic.Anthropic() reads ANTHROPIC_API_KEY from the environment — no key in your code.
.env file that is listed in .gitignore. Never paste a key into a notebook, a commit, or a screenshot. If one leaks, revoke it in the console immediately.
platform.openai.com/api-keys; store it as OPENAI_API_KEY. Used in the OpenAI examples in Chapter 1.
huggingface.co/settings/tokens; store it as HF_TOKEN or run huggingface-cli login. Used for open-weight models.
gh for everything else on GitHub.Git is also what Claude Code uses for its Bash tool on Windows. Get it from git-scm.com/downloads, or via a package manager:
winget install Git.Git
brew install gitor
xcode-select --install
sudo apt install git # Debian/Ubuntu sudo dnf install git # Fedora/RHEL
git --version git config --global user.name "Your Name" git config --global user.email "you@example.com"
The GitHub CLI logs you in to GitHub once and then handles cloning over HTTPS, pull requests, and issues. Get it from cli.github.com, or:
winget install GitHub.cli
brew install gh
sudo dnf install gh # Fedora/RHELDebian/Ubuntu: follow the signed-keyring
apt steps at cli.github.com.
gh --version gh auth login # opens a browser to authenticateAfter
gh auth login, the CLI also manages Git's GitHub credentials for you — no tokens to paste.
git clone https://github.com/jfimbett/llm-finance-book.git cd llm-finance-book conda activate llmfin pip install -r code/requirements.txt pip install -e code/ code .
Then open code/practicals/01-intro/practical.ipynb and select the Python (llmfin) kernel.
conda --version
python --version
node --version
claude --version
git --version
gh --version
python -c "import pandas, numpy, sklearn, gensim; print('libs ok')"
python -c "import anthropic; print('sdk ok')"
claude doctor; see the official troubleshooting guide at code.claude.com/docs.conda activate llmfin.llmfin environment.setx / editing your shell profile, and confirm the variable is set.