Windows
Contents
Windows¶
Python¶
We recommend installing a complete scientific python distribution. One of these is Anaconda.
Please download and install Anaconda (Python 3.8 version).
Sophos¶
To use the IPython
notebook on a Windows
computer with Sophos anti-virus installed it may be necessary to open additional ports allowing communication between the notebook and its server.
The solution is:
open your
Sophos Endpoint Security and Control Panel
from your tray or start menuSelect
Configure > Anti-virus > Authorization
from the menu at the topSelect the websites tab
click the
Add
button and add127.0.0.1
andlocalhost
to theAuthorized websites
listrestart computer (or just restart the
IPython
notebook)
Git¶
Install the GitHub Desktop Client. This comes with both a GUI client as well as the Git Bash terminal client which we will use during the course. In some instances Git Bash may need to be installed separately. In order to use conda with Git Bash follow the instructions here
You’ll know it has worked when you can open a Git Bash terminal (the window should have a title that starts with MINGW32) and get the Git version by running
git --version
which should show that you have a recent copy of Git. If your version is more than 18 months old, please update it.
C++ compiler¶
In order to use Cython
in the “Programming for Speed” module, you may need to install a C++ compiler
, see here for more details.
GitHub¶
For the Git part of the course, you require access to GitHub. You will need to sign up and follow either the GitHub Setup using the Command Line or GitHub Setup using the Desktop Client instructions, below.
GitHub Setup using the Command Line¶
GitHub Setup using the Desktop Client¶
Signing in to the GitHub Desktop Client should automatically set-up SSH based authentication for the terminal client
Configure the default terminal client (there are three different flavours of terminal on Windows:
Windows CMD
(DOS like),Windows Powershell
, andBASH
) to use BASH, as this most closely resembles theLinux
andmacOS
terminal used by other students:In the Desktop Client, select Tools
Then Options
Default Shell
Git Bash
Editor¶
Unless you already use a specific editor which you are comfortable with we recommend using one of the following:
Using any of these to edit text files including code should be straight forward.
Visual Studio Code
has integrations with Git Bash and the Python prompt that you may want to configure.
Testing your install¶
Check this works by opening the Github shell. Once you have a terminal open, type
which code
which should produce readout similar to /c/Program Files (x86)/Code/Code.exe
Also verify that typing:
code
opens the editor and then close it again.
Also test that
which git
produces some output like /bin/git
.
The which
command is used to figure out where a given program is located on disk.
Telling Git about your editor¶
Now we need to update the default editor used by Git
.
git config --global core.editor "code --wait"
Note that it is not obvious how to copy and paste text in a Windows
terminal including Git Bash
.
Copy and paste can be found by right clicking on the top bar of the window and selecting the commands from the drop down menu (in a sub menu). Alternatively the keyboard shortcuts are ctrl+insert for copy and shift+insert for paste.
Testing Python¶
Confirm that the Python
installation has worked by typing:
python -V
Which should result in details of your installed Python
version.
This should print the installed version of the Python
and Git
confirming that both are installed at working correctly.
You should now have a working version of Git
, Python
, and your chosen editor, all accessible from your shell.