Introduction to Data Science
Day 1 Setup Troubleshooting
Something not working? Find your symptom below and run the fix. Work top to bottom, most problems trace back to the first one or two steps.
If a fix does not work, stop and come to office hours. Do not spend your whole evening on this.
Reference: Day 1 Computer Setup
Find your symptom below and run the fix. If a fix doesn’t work, come to office hours (Tue/Wed/Thu 11:00am-12:00pm, Duke 209).
1. “I skipped the Miniforge install” or “conda isn’t found”
Symptom: Typing conda --version in Terminal gives command not found.
Cause: Either Miniforge was never installed, or it was installed but the shell-setup checkbox wasn’t checked.
Check if it’s actually installed:
ls ~/miniforge3
- If this shows folders (bin, envs, etc.) → Miniforge is installed, it just isn’t hooked into your shell. Skip to Fix B.
- If you get “No such file or directory” → Miniforge was never installed. Go to Fix A.
Fix A — Install Miniforge: 1. Check your chip: Apple menu → About This Mac. Look for “Apple M1/M2/M3/M4” (Apple Silicon) vs “Intel.” 2. Download: - Apple Silicon: Miniforge3-MacOSX-arm64.pkg - Intel: Miniforge3-MacOSX-x86_64.pkg - Windows: Miniforge3-Windows-x86_64.exe 3. Run the installer, accept defaults. On Mac, leave the “set up conda for your shell” checkbox checked near the end. 4. Close Terminal completely and reopen it (new window isn’t enough — quit and relaunch). 5. Check: conda --version should print a version number.
Fix B — Miniforge is there, shell just isn’t set up:
~/miniforge3/bin/conda init zsh
(Run echo $SHELL first — if it says bash instead of zsh, use conda init bash.)
Then quit and reopen Terminal completely, and check conda --version again.
Still broken? Check the init block actually landed in your shell config:
cat ~/.zshrc | grep -A 5 "conda initialize"
You should see a block between # >>> conda initialize >>> and # <<< conda initialize <<<. If nothing prints, the file may be read-only or the wrong shell was targeted — bring ls -la ~/.zshrc to office hours.
2. conda install -y jupyterlab jupyterlab-git git gh fails or hangs
Hangs at “Solving environment”: Usually a channel conflict. Add conda-forge and set it as priority:
conda config --add channels conda-forge conda config --set channel_priority strictThen re-run the install command.
Permission errors: Don’t use
sudowith conda. If you see permission errors, Miniforge probably installed somewhere it shouldn’t have — come to office hours rather than guessing.
3. gh auth login problems
Correct flow (do this in a Terminal tab inside JupyterLab for step 5, per the course instructions):
gh auth login
Answer: | Prompt | Answer | |—|—| | Account | GitHub.com | | Protocol | SSH | | Generate new SSH key? | Yes (Enter for no passphrase) | | Authenticate how? | Login with a web browser |
Copy the one-time code, paste it in the browser tab that opens, approve.
Verify:
gh auth status
Should show a green checkmark and your username.
If auth status shows an error or wrong account: run gh auth logout first, then gh auth login again and go through it clean.
4. Cloning the repo fails
The course workflow clones inside JupyterLab (Git icon → Clone a Repository → paste the git@github.com:... address), not from a plain terminal git clone.
- Clone fails almost always because
gh auth login(step 5) didn’t finish. Checkgh auth statusin a Terminal tab first. - “Permission denied (publickey)”: the SSH key from
gh auth loginwasn’t generated or registered. Re-rungh auth loginand make sure you answer “Yes” to generating a new SSH key. - Repo not found: confirm you accepted the GitHub repository invitation email (check spam) before trying to clone.
If you’re doing this from a plain terminal instead of JupyterLab’s Git panel and it wants a username/password rather than just working, git isn’t picking up gh’s credentials:
gh auth setup-git
Quick reference: the whole chain
- Miniforge installed →
conda --versionworks conda install -y jupyterlab jupyterlab-git git ghsucceedsjupyter labopens a browser windowgh auth login(SSH, browser auth) →gh auth statusshows green check- Clone repo via JupyterLab’s Git panel
hello.txttest: create, stage, commit, push, confirm on github.com
If something breaks, work backward through this list to find the actual point of failure — most downstream errors (can’t clone, can’t push) trace back to step 1 or step 4 not finishing cleanly.