Note the content listed here is the same used by the Software Carpentry community.
Since it had already been well covered there, I am only reproducing it here. Please note that the instructions listed here worked up till June, 2018. Problems setting up Python may arise over time. The ones that I become aware of and can find a solution for will be added to this post.
This article is aimed for people who are going to be attending a Scientific Computing workshop, organised by IDRACK, which includes either modules on “Programming with Python” or uses python-based scripts to demonstrate some scientific concepts.
The Python environment has extensive add-on so instead of manually installing everything, Anaconda, an all-in-one installer, is recommended. You are welcome to install either python 2.x or 3.x, unless asked to install something specific (in case of 2.x, please use 2.7 and in case of 3.x please use 3.6). Legacy versions may or may not work depending on the exact task python is used for on workshop day.
Here are the instructions for the three most commonly used OSs.
- Open https://www.anaconda.com/download/#windows with your web browser.
- Download the Python installer for Windows.
- Install Python using all of the defaults for installation except make sure to check Make Anaconda the default Python.
Open https://www.anaconda.com/download/#macoswith your web browser.
- Download the Python installer for OS X.
- Install Python using all of the defaults for installation.
- Open https://www.anaconda.com/download/#linux with your web browser.
- Download the Python installer for Linux.
(The installation requires using the shell. If you aren’t comfortable doing the installation yourself stop here and request help at the workshop. This may not always be available especially if I am already running late, which is mostly the case, in which you will have to share a computer with your friend.)
- Open a terminal window.
and then press tab. The name of the file you just downloaded should appear. If it does not, navigate to the folder where you downloaded the file, for example with:
Then, try again.
- Press enter. You will follow the text-only prompts. To move through the text, press the space key. Type
yesand press enter to approve the license. Press enter to approve the default location for the files. Type
yesand press enter to prepend Anaconda to your
PATH(this makes the Anaconda distribution the default Python).
- Close the terminal window.
Use this page which has instructions from a Software Carpentry workshop, to test if everything is functional.
If you have problems, please email me at
send me a message on IDRACK’s Facebook page here: https://www.facebook.com/idrack.pk
NOTE: Please don’t leave this process to be done on the Workshop day. That wastes a lot of times.