Skip to content

Commit 08995fc

Browse files
committed
Fixing small instruction errors
1 parent ce4af95 commit 08995fc

1 file changed

Lines changed: 136 additions & 0 deletions

File tree

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"deletable": false,
8+
"editable": false
9+
},
10+
"outputs": [],
11+
"source": [
12+
"# Initialize Otter\n",
13+
"import otter\n",
14+
"grader = otter.Notebook(\"a_start_here_libraries.ipynb\")"
15+
]
16+
},
17+
{
18+
"cell_type": "markdown",
19+
"metadata": {},
20+
"source": [
21+
"## Ensuring the libararies are installed correctly\n",
22+
"\n",
23+
"Use this JN to check that all your libraries are installed correctly, and to install any that are not.\n",
24+
"\n",
25+
"First thing to note: See the \"Select Kernel\" in the upper-right hand corner? This needs to be set to the Python version you setup in the instructions:\n",
26+
"\n",
27+
"https://docs.google.com/document/d/1Cp4uuRHMWHfKTAbYAV14y2tMWslmj_-bv_xo3CxYGAo/edit?usp=sharing\n",
28+
"\n",
29+
"Presumably, if you are reading this, than you have already set up VSCode and done the library installs in the above document. \n",
30+
"\n",
31+
"Note: If you are using this file to \"fix\" library problems, first make sure that whatever you've selected in \"Select Kernel\" is the same for both JNs. \n"
32+
]
33+
},
34+
{
35+
"cell_type": "code",
36+
"execution_count": null,
37+
"metadata": {},
38+
"outputs": [],
39+
"source": [
40+
"# These are all the imports you'll need in the class; if you get a \"library not found\" then see the following cells for installing them\n",
41+
"\n",
42+
"# Note: You may get a pop-up that says \"ipykernel needed, install y/n\". Say yes. That's the library that lets you run cells in a JN.\n",
43+
"# For Mac users with Apple silicon: That install will likely Fail - you will need to follow the instructions to over-ride the\n",
44+
"# system checks (at least as-of spring 2025). Go back to the install doc (above) and follow the instructions for how to do that.\n",
45+
"# If you've already done it, then chances are that when you did Select Kernel you did not pick the same kernel as the one you\n",
46+
"# did the homebrew install with. Double check that they are the same by typing \"python3 --version\" into a terminal - that one\n",
47+
"# should be the same as the one you picked for Select Kernel\n",
48+
"import otter\n",
49+
"import numpy\n",
50+
"import matplotlib\n",
51+
"import scipy\n",
52+
"import json"
53+
]
54+
},
55+
{
56+
"cell_type": "markdown",
57+
"metadata": {},
58+
"source": [
59+
"If all of the above imports worked, then you're done! If not, you can use the following cell to force-install the missing libraries\n",
60+
"\n",
61+
"This may take awhile, btw"
62+
]
63+
},
64+
{
65+
"cell_type": "code",
66+
"execution_count": null,
67+
"metadata": {},
68+
"outputs": [],
69+
"source": [
70+
"import sys\n",
71+
"!{sys.executable} -m pip install otter-grader\n",
72+
"!{sys.executable} -m pip install numpy\n",
73+
"!{sys.executable} -m pip install matplotlib\n",
74+
"!{sys.executable} -m pip install scipy\n",
75+
"!{sys.executable} -m pip install json"
76+
]
77+
},
78+
{
79+
"cell_type": "markdown",
80+
"metadata": {
81+
"deletable": false,
82+
"editable": false
83+
},
84+
"source": [
85+
"## Submission\n",
86+
"\n",
87+
"Make sure you have run all cells in your notebook in order before running the cell below, so that all images/graphs appear in the output. The cell below will generate a zip file for you to submit. **Please save before exporting!**"
88+
]
89+
},
90+
{
91+
"cell_type": "code",
92+
"execution_count": null,
93+
"metadata": {
94+
"deletable": false,
95+
"editable": false
96+
},
97+
"outputs": [],
98+
"source": [
99+
"# Save your notebook first, then run this cell to export your submission.\n",
100+
"grader.export(run_tests=True)"
101+
]
102+
},
103+
{
104+
"cell_type": "markdown",
105+
"metadata": {},
106+
"source": [
107+
" "
108+
]
109+
}
110+
],
111+
"metadata": {
112+
"kernelspec": {
113+
"display_name": "base",
114+
"language": "python",
115+
"name": "python3"
116+
},
117+
"language_info": {
118+
"codemirror_mode": {
119+
"name": "ipython",
120+
"version": 3
121+
},
122+
"file_extension": ".py",
123+
"mimetype": "text/x-python",
124+
"name": "python",
125+
"nbconvert_exporter": "python",
126+
"pygments_lexer": "ipython3",
127+
"version": "3.11.7"
128+
},
129+
"otter": {
130+
"OK_FORMAT": true,
131+
"tests": {}
132+
}
133+
},
134+
"nbformat": 4,
135+
"nbformat_minor": 2
136+
}

0 commit comments

Comments
 (0)