Set up your environment

This is the only setup you need to do once. Five minutes if Python is already on your machine.

What you need first

If any of those isn't ready, sort it out first; the rest assumes you can run python3 and git.


1 · Get the code

git clone https://github.com/Berta-one/claude-guides.git
cd claude-guides

2 · Create an isolated Python environment

python3 -m venv venv
source venv/bin/activate        # macOS / Linux
# venv\Scripts\activate         # Windows PowerShell
pip install -U anthropic python-dotenv jupyter

That's enough to run the first module. Other modules add packages as needed via their own requirements.txt.

3 · Add your API key

  1. Open https://console.anthropic.com, go to API Keys, click Create Key. Copy the key (it starts with sk-ant-).
  2. Make a .env file from the template, then paste your key into it:

bash cp .env.example .env # open .env in your editor and set: # ANTHROPIC_API_KEY=sk-ant-...

.env is in .gitignore so it never goes into git. Treat the key like a password — anyone with it can spend on your account.

4 · Say hello

python guides/guide-01-getting-started/scripts/main_application.py

You should see a short structured lesson plan printed by Claude. If you do, you're done with setup — go open Module 1.


What's next


If something went wrong

AuthenticationError or Invalid API Key — check .env has ANTHROPIC_API_KEY=sk-ant-... with no surrounding quotes, no leading space. Reactivate the venv (source venv/bin/activate) so the script can find python-dotenv.

ModuleNotFoundError: No module named 'anthropic' — your venv probably isn't activated. Run source venv/bin/activate and try again. If it still fails, pip install -U anthropic python-dotenv.

jupyter: command not foundpip install jupyter inside the activated venv.

Network error — confirm https://api.anthropic.com is reachable from your network (corporate proxies sometimes block it).

Anything else: open an issue with the full error and the OS you're on.