Computer Setup#
The most convenient way to get all the python packages is to use a system called anaconda. It has many advantages, so please use it even if you already have a (non-conda) python installation on your own machine.
You can get it, with the lastest python and package configs, from here. Simply download and open it, and the follow the installation instructions.
However, depending on your computer platform, we strongly recommend following the additional instructions below.
If you use Windows on your machine#
Please follow these instructions for installing the Windows Subsystem for Linux (WSL) - Ubuntu: https://docs.microsoft.com/en-us/windows/wsl/install-win10
Install Git. Open your command prompt, type “bash” to start a bash shell. Then run the following commands:
sudo apt update sudo apt install git sudo apt install wget
(you may need to type your computer login password)
Install Anaconda for Linux with Python 3.11 (note: not Anaconda for Windows!). To do this, in your command prompt, again make sure you are in the bash shell (if you still have the window open from the last step, use that, or type “bash” in a new command prompt). Then run:
wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh
To execute the script, type:
./Anaconda3-2023.09-0-Linux-x86_64.sh
If it doesn’t execute, you need to change the access permissions and make it executable:
chmod 755 Anaconda3-2023.09-0-Linux-x86_64.sh
To access the content of your Linux distribution from your windows interface you should follow the steps described on this website. The summary is as follows:
Go to your home directory (e.g.
C:\Users\remyj) on windows with your usual graphical interface. Among the tabs on the top right clickViewand tick theHidden itemsbox, then openAppData\Local\PackagesIn there you should find a file with a name like
CanonicalGroupLimited.Ubuntuxxxxxxxxx.Once in there, go to
LocalState\rootsf\homeand you should see your home directory.To do the converse operation and see your windows files from you Ubuntu prompt, you may do so by typing in your Unix prompt: ``` cd /mnt/c/Users/remy
If anacanda stops working in your Ubuntu environment, you need to load your
.bashrcagain:
source .bashrc
If you use Linux on your machine#
Simple: Open a terminal prompt, then follow step 3 above.
If you use Mac OSX on your machine#
Please make sure you have the command-line tools installed. Open the Terminal program and run the following command:
xcode-select --install
Install Anaconda for Mac with Python 3.11 from the Anaconda website linked above.
Google Colab#
Google Colab allows you to run python code in the cloud with zero installation locally on your computer. The amount of computing available at the platform should suffice for the needs of this course. You can also share your notebooks with your peers, and save the file with your results for your homework.
Next steps#
For your reference, here are some tutorials that might come handy:
The Whirlwind Tour of Python is a really good overall intro.
For Jupyter, this video is a nice intro to the ideas and the plotting capabilities.
For Git / version control, this tutorial shows the typical workflows.