If you want to use your own Mac for MAS2008, you should follow
the steps below. I do not routinely use a Mac, so the instructions
may not be optimal. I would welcome any suggestions for improvement.
For the sake of example, I will assume that your name is Pat.
Double-click the downloaded file to install VS Code. Accept all default options.
Download this file: requirements.txt. Save it in
/Users/Pat/Documents/Python.
Start VS Code. You should see a top menu with items labelled File,
Edit, Selection and so on. In Windows this menu is
attached to the top of the VS code window, but on a Mac it is attached to the top
of the screen.
From the top menu, select File, then Open Folder.
This will pop up a box in which you can navigate to /Users/Pat/Documents and
select Python.
From the top menu, select Terminal, and then New terminal.
This will create a new area at the bottom of the VS Code window where you can enter commands.
In the terminal area, type python3 -m pip install --upgrade pip.
This should only take a few seconds to complete.
In the terminal area, type pip3 install -r requirements.txt.
This will install a long list of Python packages that will be needed later in
the course. (It would also be possible to install them individually as needed,
but that would be less efficient.) The installation process may take quite a while.
Later in the course I will mostly give instructions for Windows and may or
may not remember to mention a few small differences for Mac users. In Windows,
the above two commands would be python -m pip install --upgrade pip
and pip install -r requirements.txt respectively. Note that the
first command needs pip on both platforms, but the second command
needs pip3 on a Mac and pip on Windows.
Click the extensions icon () on
the left of the VS Code window.
In the extension search box at the top left, enter Pylance, then
press Enter. This will install the Pylance extension and various
other associated extensions, all of which are useful when editing
Python code.
In the extension search box at the top left, enter Jupyter, then
press Enter. This will install an extension to help with editing
Jupyter notebooks. (Note that Jupyter is spelled with a y and
not an i here.)
Repeat the above step to install the
"British English - Code Spell Checker" extension.
(This will be useful later in the semester when you need to write
assignment reports which will contain a lot of text as well as code.)
Assuming that you opened the folder
/Users/Pat/Documents/Python as described above,
you should see the folder name PYTHON at the top left.
Click on it, then click on the New File icon that
appears next to it, then enter hello.ipynb as the
file name.
Enter print("Hello World!")
in the space
that appears as a result of the previous step, then type
SHIFT-ENTER. You will probably then be asked to choose a Python
interpreter, but there will probably only be one choice, so you
should click it. The message Hello World! should then appear.
If, at the previous step, you are offered more than one Python
interpreter, then you should do the following. Go back to the
terminal area, type which python3 and press ENTER.
Select whichever interpreter corresponds to the output of this command.
Later in the course you will need to have Git installed. (This
is a system that keeps track of changes to files and allows for
collaborative editing by many users.) The most painless way to
get Git on a Mac is to install
Xcode from the App Store.
However, this will also install many other development tools,
so it is a rather large download, and you will also need an Apple ID.