You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> [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].
32
32
>
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).
41
35
{: .prereq}
42
36
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.
44
67
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
49
69
50
-
### Anaconda installation
70
+
c. Type
51
71
52
-
Anaconda will install the workshop packages for you.
72
+
~~~
73
+
bash Anaconda3-
74
+
~~~
75
+
{: .language-bash}
53
76
54
-
#### Download and install Anaconda
77
+
and press <kbd>Tab</kbd>. The name of the file you just downloaded should appear.
55
78
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>.
58
80
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).
60
87
61
-
The plotting package plotnine is not installed by default. From the terminal,
## 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:
63
99
64
100
~~~
65
-
conda install -c conda-forge plotnine
101
+
conda --help
66
102
~~~
67
103
{: .language-bash}
68
104
69
-
### Miniconda installation
105
+
### Mac OSX
70
106
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:
73
109
74
-
#### Download and install Miniconda
110
+
~~~
111
+
conda --help
112
+
~~~
113
+
{: .language-bash}
75
114
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:
79
117
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:
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:
83
135
84
136
~~~
85
-
conda list
137
+
conda install -y -c conda-forge plotnine
86
138
~~~
87
139
{: .language-bash}
88
140
89
-
### Install the required workshop packages with conda
141
+
This will then install the latest version of plotnine into your conda environment.
90
142
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}
92
149
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:
93
154
~~~
94
155
conda install -y numpy pandas matplotlib jupyter
95
156
conda install -c conda-forge plotnine
96
157
~~~
97
158
{: .language-bash}
98
159
160
+
99
161
## Launch a Jupyter notebook
100
162
101
163
After installing either Anaconda or Miniconda and the workshop packages,
0 commit comments