Skip to content

Commit e1ae004

Browse files
authored
Merge pull request #470 from ppxasjsm/gh-pages
Adding extended setup instructions
2 parents f75077d + 396ba28 commit e1ae004

1 file changed

Lines changed: 101 additions & 39 deletions

File tree

setup.md

Lines changed: 101 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,78 +24,140 @@ title: Setup
2424

2525

2626

27-
> ## Software
28-
> [Python](http://python.org) is a popular language for
29-
> scientific computing, and great for general-purpose programming as
30-
> well. Installing all of its scientific packages individually can be
31-
> a bit difficult, so we recommend an all-in-one installer.
27+
> ## Installing Python using Anaconda
28+
> [Python][python] is a popular language for scientific computing, and great for
29+
> general-purpose programming as well. Installing all of the scientific packages we use in the lesson
30+
> individually can be a bit cumbersome, and therefore recommend the all-in-one
31+
> installer [Anaconda][anaconda].
3232
>
33-
> For this workshop we use Python version 3.x.
34-
>
35-
> ### Required Python Packages for this workshop
36-
>
37-
> * [Pandas](http://pandas.pydata.org/)
38-
> * [Jupyter notebook](http://jupyter.org/)
39-
> * [Numpy](http://www.numpy.org/)
40-
> * [Matplotlib](http://matplotlib.org/)
33+
> Regardless of how you choose to install it, please make sure you install Python
34+
> version 3.x (e.g., 3.6 is fine).
4135
{: .prereq}
4236

43-
## Install the workshop packages
37+
### Windows - [Video tutorial][video-windows]
38+
39+
1. Open <https://www.anaconda.com/products/individual> in your web browser.
40+
41+
2. Download the Python 3 installer for Windows.
42+
43+
3. Double-click the executable and install Python 3 using the recommended settings. Make sure that **Register Anaconda as my default Python 3.x** option is checked - it should be in the latest version of Anaconda
44+
45+
46+
### Mac OS X - [Video tutorial][video-mac]
47+
48+
1. Visit <https://www.anaconda.com/products/individual> in your web browser.
49+
50+
2. Download the Python 3 installer for OS X. These instructions assume that you use the graphical installer `.pkg` file.
51+
52+
3. Follow the Python 3 installation instructions. Make sure that the install location is set to "Install only for me" so Anaconda will install its files locally, relative to your home directory. Installing the software for all users tends to create problems in the long run and should be avoided.
53+
54+
55+
### Linux
56+
57+
Note that the following installation steps require you to work from the terminal (shell).
58+
If you run into any difficulties, please request help before the workshop begins.
59+
60+
1. Open <https://www.anaconda.com/products/individual> in your web browser.
61+
62+
2. Download the Python 3 installer for Linux.
63+
64+
3. Install Python 3 using all of the defaults for installation.
65+
66+
a. Open a terminal window.
4467

45-
For installing these packages we will use Anaconda or Miniconda.
46-
They both use [Conda](https://conda.io/en/latest/), the main difference is
47-
that Anaconda comes with a lot of packages pre-installed.
48-
With Miniconda you will need to install the required packages.
68+
b. Navigate to the folder where you downloaded the installer
4969

50-
### Anaconda installation
70+
c. Type
5171

52-
Anaconda will install the workshop packages for you.
72+
~~~
73+
bash Anaconda3-
74+
~~~
75+
{: .language-bash}
5376
54-
#### Download and install Anaconda
77+
and press <kbd>Tab</kbd>. The name of the file you just downloaded should appear.
5578
56-
Download and install [Anaconda](https://www.anaconda.com/distribution/#download-section).
57-
Remember to download and install the installer for Python 3.x.
79+
d. Press <kbd>Return</kbd>.
5880
59-
#### Download plotting package
81+
e. Follow the text-only prompts. When the license agreement appears (a colon
82+
will be present at the bottom of the screen) press <kbd>Spacebar</kbd> until you see the
83+
bottom of the text. Type `yes` and press <kbd>Return</kbd> to approve the license. Press
84+
<kbd>Return</kbd> again to approve the default location for the files. Type `yes` and
85+
press <kbd>Return</kbd> to prepend Anaconda to your `PATH` (this makes the Anaconda
86+
distribution your user's default Python).
6087
61-
The plotting package plotnine is not installed by default. From the terminal,
62-
type:
88+
89+
[anaconda]: https://www.anaconda.com/
90+
[jupyter]: https://jupyter.org/
91+
[python]: https://www.python.org/
92+
[video-mac]: https://www.youtube.com/watch?v=TcSAln46u9U
93+
[video-windows]: https://www.youtube.com/watch?v=xxQ0mzZ8UvA
94+
95+
## Opening a Conda-enabled Terminal and Verifying the Installation:
96+
97+
### Windows
98+
Click Start, search, or select Anaconda Prompt from the menu. A window should pop up where you can now type commands such as checking your Conda installation with:
6399
64100
~~~
65-
conda install -c conda-forge plotnine
101+
conda --help
66102
~~~
67103
{: .language-bash}
68104
69-
### Miniconda installation
105+
### Mac OSX
70106
71-
Miniconda is a "light" version of Anaconda. If you install and use Miniconda
72-
you will also need to install the workshop packages.
107+
Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
108+
A window should pop up where you can now type commands such as checking your conda installation with:
73109
74-
#### Download and install Miniconda
110+
~~~
111+
conda --help
112+
~~~
113+
{: .language-bash}
75114
76-
Download and install [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
77-
following the instructions. Remember to download and run the installer for
78-
Python 3.x.
115+
### Linux
116+
This depends a bit on your Linux distribution, but often you will have an Applications listing in which you can select a Terminal icon you can click. A window should pop up where you can now type commands such as checking your conda installation with:
79117
80-
#### Check the installation of Miniconda
118+
~~~
119+
conda --help
120+
~~~
121+
{: .language-bash}
122+
123+
124+
## Required Python Packages for this Workshop
125+
The following are packages needed for this workshop:
126+
127+
* [Pandas](https://pandas.pydata.org/)
128+
* [Jupyter notebook](https://jupyter.org/)
129+
* [Numpy](https://numpy.org/)
130+
* [Matplotlib](https://matplotlib.org/)
131+
* [Plotnine](https://plotnine.readthedocs.io/en/stable/)
81132
82-
From the terminal, type:
133+
All packages apart from plotnine will have automatically been installed with Anaconda and we can use anaconda as a package manager to install the missing `plotnine` package:
134+
You need to open up a *Terminal*, if you are using Mac OSX, or Linux (see instructions above), or launch an *anaconda-promt*, if you are using Windows. In your terminal window type the following:
83135
84136
~~~
85-
conda list
137+
conda install -y -c conda-forge plotnine
86138
~~~
87139
{: .language-bash}
88140
89-
### Install the required workshop packages with conda
141+
This will then install the latest version of plotnine into your conda environment.
90142
91-
From the terminal, type:
143+
## Installing other Packages (Not required)
144+
If you want to install any additional packages, you can do so by opening a terminal window and type:
145+
~~~
146+
conda install -y package_name
147+
~~~
148+
{: .language-bash}
92149
150+
You may need to install the required packages in this way,
151+
if you opted for installing Miniconda, instead of Anaconda.
152+
Miniconda is a lightweight version of Anaconda. If you install and use Miniconda
153+
you will also need to install the workshop packages manually in the following way:
93154
~~~
94155
conda install -y numpy pandas matplotlib jupyter
95156
conda install -c conda-forge plotnine
96157
~~~
97158
{: .language-bash}
98159
160+
99161
## Launch a Jupyter notebook
100162
101163
After installing either Anaconda or Miniconda and the workshop packages,

0 commit comments

Comments
 (0)