For this lesson you would need:
Python is a popular language for research computing, and great for general-purpose programming as well. Installing all of its research packages individually can be a bit difficult, so we recommend Anaconda, an all-in-one installer. Regardless of how you choose to install it, please make sure you install Python version 3.6. We will teach Python using the Jupyter Notebook, a programming environment that runs in a web browser. For this to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).
bash Anaconda3-
and then press tab. The name of the file you just downloaded should appear.
Press enter. You will follow the text-only prompts. When there is a colon at the bottom of the screen press the down arrow to move down through the text. Type yes and press enter to approve the license. Press enter to approve the default location for the files. Type yes and press enter to prepend Anaconda to your PATH (this makes the Anaconda distribution the default Python).
One of the useful things about Anaconda Python is its tools for Python package management and project environments. The core tool for this is the command-line utility conda. However, there is also a GUI tool called “Anaconda Navigator”.
As part of this workshop, we will learn how to use Anaconda navigator to manage our Python environment and for this setup section, you only need to check Anaconda Navigator is available on your laptop. Do not hesitate to contact us if you have any problems. We will be able to help you with the installation during the workshop so do not worry!
Launch “Anaconda Navigator” from your menu. This should work on any operating system (Windows, Mac-OSX and Linux) and a window should pop up:
On Mac-OSX or Linux, you may want to launch it from the command line:
$ anaconda-navigator
Credits
This installation tutorial is taken from Software Carpentry
We will be using Anaconda Navigator to install all the python packages we will be using for this lesson:
Before launching Jupyter notebook and creating our first notebook we will:
After you install Anaconda on Windows, start Navigator by:
Clicking the Anaconda Navigator desktop app from the start menu. Or by opening an Anaconda Prompt from the start menu and running the command anaconda-navigator.
After you install Anaconda on macOS, start Navigator by:
Clicking the Navigator menu item that was automatically added to your menu.
Or open Launchpad, click Terminal or iTerm and enter the command anaconda-navigator.
$ anaconda-navigator
After you install Anaconda on Linux, you can start Anaconda Navigator by opening a Terminal window and running the command “anaconda-navigator”:
$ anaconda-navigator
Anaconda does not add shortcuts for Linux automatically because different Linux distributions have different systems for adding menu or desktop shortcuts. You can use your operating system to create desktop and/or main-menu shortcuts that run the command anaconda-navigator.
For more information on how to start Anaconda Navigator look here.
Open a Terminal and type:
conda env create -f environment.yml
source activate jupyter_dashboards_workshop
jupyter notebook
Anaconda Navigator
Click on the “Folder” icon and browse your file to select environment.yml.
Click on “Import”. This stage may take a few minutes so be patient…
We want to start a new jupyter notebook using our newly created conda environment. To select “jupyter_dashboards_workshop” conda environment:
Jupyter starts in your default browser at the address http://localhost:8888/tree and shows the tree (directories) from the root directory (here is root directory is to be understood from the installation location of Anaconda). It may vary from one laptop to another but you should not worry about it.
When clicking on “New” (right hand side) as shown on the Figure below:
You should be able to select “Python 3”. That’s all you need for the workshop!
Default browser
You may need to change the default browser for starting your jupyter notebook. All the examples in this lesson have been tested with Google chrome
Important notice
This setup instruction are from https://reproducible-science-curriculum.github.io/sharing-RR-Jupyter/ and is distributed under the Creative Commons Attribution license. The following is a human-readable summary of (and not a substitute for) the full legal text of the CC BY 4.0 license.
To use GitHub one needs to register for a (free) account. To register for a GitHub account we need to:
We should see the the web page below.
Note: If you already have a GitHub account you do NOT need to create a new one. Please skip this step.
On the GitHub homepage enter:
Click the green Sign up for GitHub button.
An example is shown in the screenshot below.
We are asked to confirm the email address that we used to sign. Please confirm the email address.
Select a plan
We have to choose a plan that we would like to use. We will use the personal (default) plan.
Click on Continue.
Completing our signup
We can select any options we would like (on none).
Click Submit to complete our Github
account setup.
On some laptops, installing docker may be tricky so don’t worry if you don’t manage to install docker on your computer before the workshop!.
Follow instructions depending on your Operating system:
If your OS does not meet the requirements of Docker for Windows or Docker for Mac you will need to install VirtualBox and Docker Toolbox.