-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.html
146 lines (141 loc) · 5.08 KB
/
install.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2024-09-06 Fri 14:25 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Installation Guide</title>
<meta name="author" content="Nathan Mull" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="../globalStyle.css" />
</head>
<body>
<div id="org-div-home-and-up"><a href="material.html">↩</a></div><div id="content" class="content">
<h1 class="title">Installation Guide</h1>
<p>
The following is a short installation guide for this course. I will
generally be assuming access to a unix-style command line.
</p>
<p>
<i>Note.</i> In the long run, if you are a Windows user, I recommend
setting up a <a href="https://learn.microsoft.com/en-us/windows/wsl/install">WSL environment</a>. This give you a Linux subsystem which
will make other CS courses go a lot smoother (in my opinion). If you
want something a little simpler, you can set up the <a href="https://gitforwindows.org">Git Bash</a> emulator,
which should be sufficient for this course. Follow the instructions
at either one of those links.
</p>
<p>
If you don't do either of these things (e.g., if you want to work
directly in PowerShell) then we cannot guarantee we'll able to
troubleshoot any issues you might run into.
</p>
<div id="outline-container-orgc794b38" class="outline-2">
<h2 id="orgc794b38">Setting Things Up</h2>
<div class="outline-text-2" id="text-orgc794b38">
<ol class="org-ol">
<li><p>
Install the latest release of python from
<a href="https://www.python.org">https://www.python.org</a>. Follow the "Downloads" tab to an installer
for your operating system. After doing this, you should open up a
terminal and run the command
</p>
<div class="org-src-container">
<pre class="src src-none">python3
</pre>
</div>
<p>
in on the command line to open in interactive Python REPL
(Read-Eval-Print-Loop) to verify that everything was set up
correctly. You can then type CTL-D to exit the REPL.
</p></li>
<li><p>
The above installation includes a program called `pip3`, which is a
package manager for Python. run the following command:
</p>
<div class="org-src-container">
<pre class="src src-none">pip3 install sympy numpy scipy matplotlib networkx scikit-learn
</pre>
</div>
<p>
This will install all the libraries you need for this course.
</p></li>
<li>(Optional) Install <a href="https://visualstudio.microsoft.com/downloads/">VSCode</a>.</li>
</ol>
</div>
</div>
<div id="outline-container-org420ca47" class="outline-2">
<h2 id="org420ca47">Working on Python Code</h2>
<div class="outline-text-2" id="text-org420ca47">
<ol class="org-ol">
<li>Open up a <code>file_name.py</code> file in your favorite editor and edit the code.</li>
<li><p>
In a terminal, navigate to the directory where your Python file is, e.g.,
</p>
<div class="org-src-container">
<pre class="src src-none">cd path/to/directory/where/file/is
</pre>
</div></li>
<li><p>
Run the command
</p>
<div class="org-src-container">
<pre class="src src-none">python3 file_name.py
</pre>
</div>
<p>
to evaluate the code in that file. If you want to evaluate the
file and then go into an interactive Python REPL, then run
</p>
<div class="org-src-container">
<pre class="src src-none">python3 -i file_name.py
</pre>
</div></li>
</ol>
</div>
</div>
<div id="outline-container-orgdcea8c6" class="outline-2">
<h2 id="orgdcea8c6">Tips</h2>
<div class="outline-text-2" id="text-orgdcea8c6">
<ul class="org-ul">
<li><p>
You may want to brush up on basic command line usage. Important
things to know:
</p>
<ul class="org-ul">
<li><code>ls</code> show whats in your current directory</li>
<li><code>pwd</code> show the path of the directory you're currently in</li>
<li><code>cd path/to/directory_name</code> go to the directory given by the path</li>
<li><code>rm file</code> delete file (this cannot be undone! it's not the same as
putting in the Trash folder)</li>
<li><code>rm -r directory_name</code> delete a directory and everything in it
(this cannot be undone!)</li>
<li><code>touch file_name</code> create an empty file called <code>file_name</code></li>
<li><code>mkdir dir_name</code> create an empty directory called <code>dir_name</code></li>
</ul>
<p>
<b>(Become comfortable with these commands!)</b>
</p></li>
<li><p>
I generally recommend putting all your code for this course in a
single directory in, for example, your Documents folder. You can run the command
</p>
<div class="org-src-container">
<pre class="src src-none">mkdir -p ~/Documents/CS132-F24
</pre>
</div>
<p>
to create this directory. This is equivalent to going to the
Documents folder (in Finder for MacOS) and creating a new folder.
</p></li>
<li>Setting up a machine takes some time (and some tears). But please
understand that this is an incredibly important part of being a
computer scientist. <i>You have to know how to set up your coding
environment.</i></li>
</ul>
</div>
</div>
</div>
</body>
</html>