conda is not recognized, or command not found
On Windows, open Anaconda Prompt from the Start menu; PowerShell, Command Prompt, and the VS Code terminal often cannot find conda. On macOS, quit and reopen Terminal after installing Anaconda.
conda cannot find environment.yml
The prompt is not in the course folder yet. Run dir (Windows) or ls (macOS) and confirm that environment.yml is listed. On Windows, if the folder is on a drive other than C:, use cd /d followed by the path.
earth-course is missing from the kernel list
Quit and reopen VS Code so it detects the new environment, then repeat step 6. If the name is still missing, run conda env list to check that step 2 finished without an error.
No module named 'pandas', or a prompt to install ipykernel
The notebook is using a different Python environment. Switch the kernel to earth-course (step 6), which already includes pandas, NumPy, Matplotlib, and ipykernel. Then click Restart and run the notebook from the first cell.
No module named 'earthcourse'
Run the path cell first (step 7). It adds the course folder's src directory, where earthcourse lives, to Python's search path. If the error remains, the notebook is outside the course folder (step 5).
Processed data folder exists: False, or FileNotFoundError
The notebook is outside the course folder. Move it into the matching notebooks/ subfolder (step 5), reopen it from the VS Code Explorer, and click Restart before you run the path cell again.
Cells will not run, and VS Code mentions Restricted Mode
The folder is not trusted yet. Click Restricted Mode at the left end of the status bar, at the bottom of the window, and trust the folder.
Creating the environment fails
Copy the last lines of the error message and bring them to studio, or include them in an email to your instructor. Meanwhile, if you installed the full Anaconda Distribution, you can pick its base environment in step 6; it already includes every package these labs use.
The kernel crashes, or VS Code says the kernel died
A crash with no Python error message points to the Python environment on this computer. If the same notebook runs on another computer, the notebook itself is fine. Work through these checks in order.
-
Check the kernel. The name at the top right of the notebook should read earth-course. If it shows base, another Python version, or a Microsoft Store Python, switch it (step 6).
-
Test the environment outside Jupyter. Run the two lines below in Anaconda Prompt or Terminal. If they print OK and create test_plot.png, the environment works and the problem is in Jupyter. If they show an error, that message is the clue to fix.
Anaconda Prompt or Terminal
conda activate earth-course
python -c "import pandas, matplotlib; matplotlib.use('Agg'); import matplotlib.pyplot as plt; plt.plot([1, 2, 3]); plt.savefig('test_plot.png'); print('OK', pandas.__version__, matplotlib.__version__)"
-
Read the Jupyter log. Click View Jupyter log in the crash message, or open the Output panel and choose Jupyter. The last lines usually name the actual error.
-
Rebuild the environment. In Anaconda Prompt or Terminal, go to the course folder (as in step 2), then remove earth-course and create it again. Reopen VS Code, select earth-course (step 6), and click Restart.
Anaconda Prompt or Terminal
conda deactivate
conda env remove -n earth-course
conda env create -f environment.yml
Avoid installing extra packages into earth-course with pip; mixing pip and conda installs is one common cause of crashes.
Still crashing? Bring the last lines of the Jupyter log to studio, or include them in an email to your instructor. Until it is fixed, you can keep working on any computer where the course environment runs.