You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+91Lines changed: 91 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,4 +50,95 @@ To explain up-front:
50
50
- When taking an exam for practice, we recommend having a copy of the DSC 10 reference sheet open in another tab, as well as a second copy of the exam, so you can access the data descriptions.
51
51
52
52
53
+
### Troubleshooting tips
54
+
#### yaml `ModuleNotFoundError`
55
+
```
56
+
python run.py
57
+
Traceback (most recent call last):
58
+
File "..../practice.dsc40a.com/run.py", line 1, in <module>
59
+
import yaml
60
+
ModuleNotFoundError: No module named 'yaml'
61
+
```
62
+
**Example Behavior:**
63
+
```
64
+
(base) practice.dsc40a.com % python run.py
65
+
Traceback (most recent call last):
66
+
File "practice.dsc40a.com/run.py", line 1, in <module>
67
+
import yaml
68
+
ModuleNotFoundError: No module named 'yaml'
69
+
(base) practice.dsc40a.com % pip3 install PyYAML
70
+
71
+
[notice] A new release of pip is available: 24.2 -> 25.3
72
+
[notice] To update, run: python3.12 -m pip install --upgrade pip
73
+
error: externally-managed-environment
74
+
75
+
× This environment is externally managed
76
+
╰─> To install Python packages system-wide, try brew install
77
+
xyz, where xyz is the package you are trying to
78
+
install.
79
+
80
+
If you wish to install a Python library that isn't in Homebrew,
81
+
use a virtual environment:
82
+
83
+
python3 -m venv path/to/venv
84
+
source path/to/venv/bin/activate
85
+
python3 -m pip install xyz
86
+
87
+
If you wish to install a Python application that isn't in Homebrew,
88
+
it may be easiest to use 'pipx install xyz', which will manage a
89
+
virtual environment for you. You can install pipx with
90
+
91
+
brew install pipx
92
+
93
+
You may restore the old behavior of pip by passing
94
+
the '--break-system-packages' flag to pip, or by adding
95
+
'break-system-packages = true' to your pip.conf file. The latter
96
+
will permanently disable this error.
97
+
98
+
If you disable this error, we STRONGLY recommend that you additionally
99
+
pass the '--user' flag to pip, or set 'user = true' in your pip.conf
100
+
file. Failure to do this can result in a broken Homebrew installation.
101
+
102
+
Read more about this behavior here: <https://peps.python.org/pep-0668/>
103
+
104
+
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
105
+
hint: See PEP 668 for the detailed specification.
106
+
```
107
+
**Solution:**
108
+
- If you have already installed the above packages but still encounter this issue,
109
+
- Taken DSC 80,
110
+
Use DSC 80 environment either in terminal or in VS code.
111
+
112
+
#### Pathname issue
113
+
```
114
+
File "practice.dsc40a.com/run.py", line 549, in <module>
115
+
write_all_pages()
116
+
File "practice.dsc40a.com/run.py", line 508, in write_all_pages
0 commit comments