These instructions are also covered in this
YouTube video.
In MAS2008 (Scientific Computing) we will use the Visual Studio Code
integrated development environment as the primary way to
interact with Python. This has many advantages:
It has powerful facilities to check for errors and offer
suggestions and hints as you type.
It offers easy access to a debugger with rich features.
It is tightly integrated with the Git system for version
control and collaborative development.
VS Code is already available on the university's open access PCs.
However, some additional setup is needed before it can be used for
MAS2008. The main point is that VS Code can be used for many different
programming languages, and we need to tell it that we want to use it
for Python and Jupyter notebooks. This is done by installing some
extensions.
After logging in to the PC, enter "code" in the search box
at the bottom left of the screen. This should bring up the
VS Code icon. Click on it to start VS Code. (You might then
want to right-click on the icon and select "Pin to taskbar" to
make it easier to find next time.)
Click on the "Extensions" icon on the left of the VS Code window.
This is the one that looks like a square with four squares inside it:
.
In the search box at the top of the window, enter "Pylance".
This should bring up a list of extensions, including one called
"Pylance". Click on the "Install" button to install it.
Repeat the above step to install the "Jupyter" extension.
You should see that several other extensions have automatically
been installed as well. (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.)
You can stop at this point if you want. However, you could also take
the following steps to suppress some useless and annoying messages.
Open the settings search box by typing CTRL-,. (In more detail,
you should hold down the CTRL key and press the comma key.)
Alternatively, you can select File, then Settings, then Preferences
from the top menu.
In the search box, enter "updates". Then change the update mode
from "default" to "none". (On your own PC, you should update VS Code
as recommended, but you do not have the required permissions to do
this on the university PCs.)
Go back to the search box and enter "recommend". Then click
checkbox to ignore extension recommendations.