Since we build courses with various partners (AWS, OpenAI, etc.) and won’t write here a guide for every SDK, remember that you will mostly find first set up steps in the very same notebooks of short courses. However, here we write a guide on Environment Replication.
-
Prerequisites checklist: always check your Python version, pip/conda, environment setup
-
The “.env” Standard: This is because the platform notebooks often have hidden API keys. To create a .env file locally to store keys (e.g., OPENAI_API_KEY, ANTHROPIC_API_KEY).
MacOS & Linux (same steps)
Step 1: Open Terminal
-
macOS: Cmd + Space → type Terminal
-
Linux: Open Terminal
Step 2: Go to your project folder cd path/to/your/project
Step 3: Create the .env file. Type in the terminal: touch .env
Step 4: Open it with a text editor. Type in the terminal: nano .env
(or) code .env (if you use VS Code)
Step 5: Add variables
API_KEY=abc123
DATABASE_URL=localhost
Step 6: Save and exit
-
Ctrl + O → Enter
-
Ctrl + X
Done.
Windows
Using File Explorer (beginner-friendly)
-
Open your project folder
-
Right click → New → Text Document
-
Rename it to: .env
-
If Windows warns you about changing the extension → click Yes
-
Open it with Notepad or VS Code
-
Add your key, for example: API_KEY=abc123
Important:
Make sure it’s NOT .env.txt
-
Library Management:
-
To install those libraries/packages specific versions locally run:
- pip install -r requirements.txt
to avoid dependency issues later on running the notebooks.
- pip install -r requirements.txt
-
-
The Partner Distinction:
- Cloud-Based (Vertex AI, Bedrock): running these locally requires an active AWS/GCP account and CLI configuration, not just Python code.
-
Common errors & fixes:
-
Module not found → installation commands
-
API authentication failures → key verification steps
-
Rate limiting → retry logic examples
-
-
Notebooks not running
-
Remember notebooks run inside a virtual machine in the platform, firstly you might need to be patience that everything is loaded and ready to run, if having issues while loading or while running you can always try:
-
Kernel > Restart and Clear Output
-
Reload all the page
-
Be careful to run cell by cell when need to open terminals or other platforms as some code cells might need actions inside terminal or platform to trigger the next activity
-
-