From 71b3cb36bfd1cb7aaa41c2ff6e4c6719d5622d5e Mon Sep 17 00:00:00 2001 From: MJ Rossetti Date: Wed, 25 Sep 2024 12:15:32 -0400 Subject: [PATCH] Add appendix, fix link --- docs/_quarto.yml | 3 ++- docs/exercises/run-the-app/index.qmd | 21 ++++++++++++++++++- .../exercises/run-the-app/troubleshooting.qmd | 20 ------------------ 3 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 docs/exercises/run-the-app/troubleshooting.qmd diff --git a/docs/_quarto.yml b/docs/_quarto.yml index 17c8c2f..50bbcb2 100644 --- a/docs/_quarto.yml +++ b/docs/_quarto.yml @@ -13,7 +13,6 @@ project: # https://github.com/quarto-dev/quarto-cli/discussions/7312#discussioncomment-7345228 - prereqs/local-dev-setup/terminal-config.qmd - prereqs/local-dev-setup/vs-code-config.qmd - - exercises/run-the-app/troubleshooting.qmd - notes/clis/brew.qmd @@ -107,6 +106,8 @@ book: - prereqs/local-dev-setup/terminal-config.qmd - href: prereqs/local-dev-setup/vs-code-config.qmd text: "VS Code Configuration" + - href: notes/clis/brew.qmd + text: "Homebrew Package Manager (Mac OS)" # shows up at bottom of page #body-footer: "© Copyright 2024, Your Name Here" diff --git a/docs/exercises/run-the-app/index.qmd b/docs/exercises/run-the-app/index.qmd index 3551a66..76658f5 100644 --- a/docs/exercises/run-the-app/index.qmd +++ b/docs/exercises/run-the-app/index.qmd @@ -29,4 +29,23 @@ Optionally simulate many games between computer players, and see the CSV file of Practice passing environment variables to customize the game count and player types. -## [Troubleshooting & Help](./troubleshooting.qmd) +## Troubleshooting & Help + + +Here are some common errors you may run into while trying to run Python apps locally. + +## Bad Anaconda Installation + +If you try to run a `conda` command, and you see an error like **"conda: command not found"**, it means there's something wrong with your installation. + +It's OK. Feel free to reach out to an instructor and ask for help. See also these [known troubleshooting remedies](https://github.com/prof-rossetti/intro-to-python/issues/13). + +We will probably have to ask `where anaconda` in the Anaconda Prompt program to learn where your Anaconda installation resides, then issue a corresponding command like `~/anaconda3/Scripts/conda init bash` in Git Bash to fix the issue. Then close and re-open Git Bash for the changes to take effect. + +## Can't Install Packages / Forgot to Navigate to the Local Repo + +If the `pip install -r requirements.txt` command throws an error like **"Could not open requirements file: [Errno 2] No such file or directory"**, make sure you are running it from the repository's root directory, where the "requirements.txt" file exists (see the initial `cd` step to navigate into the repository's root directory). + +## Forgot to Install Packages + +If you see an error like **"ModuleNotFoundError: No module named '...'"**, it's because the given package isn't installed, so run the `pip install -r requirements.txt` command from the repository's root directory to ensure that package has been installed into the virtual environment, before trying to run the app again. diff --git a/docs/exercises/run-the-app/troubleshooting.qmd b/docs/exercises/run-the-app/troubleshooting.qmd deleted file mode 100644 index ad43d4a..0000000 --- a/docs/exercises/run-the-app/troubleshooting.qmd +++ /dev/null @@ -1,20 +0,0 @@ - -# Troubleshooting Python Applications - -Here are some common errors you may run into while trying to run Python apps locally. - -## Bad Anaconda Installation - -If you try to run a `conda` command, and you see an error like **"conda: command not found"**, it means there's something wrong with your installation. - -It's OK. Feel free to reach out to an instructor and ask for help. See also these [known troubleshooting remedies](https://github.com/prof-rossetti/intro-to-python/issues/13). - -We will probably have to ask `where anaconda` in the Anaconda Prompt program to learn where your Anaconda installation resides, then issue a corresponding command like `~/anaconda3/Scripts/conda init bash` in Git Bash to fix the issue. Then close and re-open Git Bash for the changes to take effect. - -## Can't Install Packages / Forgot to Navigate to the Local Repo - -If the `pip install -r requirements.txt` command throws an error like **"Could not open requirements file: [Errno 2] No such file or directory"**, make sure you are running it from the repository's root directory, where the "requirements.txt" file exists (see the initial `cd` step to navigate into the repository's root directory). - -## Forgot to Install Packages - -If you see an error like **"ModuleNotFoundError: No module named '...'"**, it's because the given package isn't installed, so run the `pip install -r requirements.txt` command from the repository's root directory to ensure that package has been installed into the virtual environment, before trying to run the app again.