1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
\section{Introduction to Anaconda
Navigator}\label{introduction-to-anaconda-navigator}
Anaconda Navigator is a program that we will be using in this course to
manage Python environments, libraries and launch programs to help us
write our python code.
The Anaconda website nicely describes \emph{Navigator} as:
\emph{a graphical user interface (GUI) that enables you to work with
packages and environments without needing to type conda commands in a
terminal window.Find the packages you want, install them in an
environment, run the packages, and update them -- all inside Navigator.}
To better understand how Navigator works and interacts with the anaconda
ecosystem see the figure below.
\includegraphics{figures/AnacondaSchematic.png} As you schematic
indicated, Navigator is a tool in the Anaconda toolbox that allows the
user to select and configure python environments and libraries. Let's
see how we can do this.
\subsection{Getting Started}\label{getting-started}
Note to windows 10 users: Some installation instances do not allow users
to search the start menu for \emph{Navigator}, instead, you'll have to
find the program under the \emph{Anaconda (anaconda3)} folder. Expand
the folder and click on \emph{Anaconda Navigator} to launch the program.
\begin{figure}
\centering
\includegraphics{figures/installingAnaconda_windows_launched.png}
\caption{Anaconda Navigator screen}
\end{figure}
Once Navigator starts, under \emph{Home}, you'll see tiles of programs
that come with anaconda. The tab allows you to launch the programs we
will be using in this course. Before jumping straight into the programs
we will first need to configure our Python instance.
The \emph{Environment} page allows us to install a variety of libraries
and configure our environments for different project, more on this in
the next section.
\subsection{Environments}\label{environments}
A Python environment can be thought of as a ``container'' where you can
have all the tools, libraries, and dependencies your Python project
needs without interfering with other projects. Think of it as a
dedicated toolbox for your project.
Although the base environment comes with many libraries and programs
pre-installed, it's recommended to create a dedicated environment for
your projects. This protects the base environment from breaking due to
complex dependency conflicts. Let us go ahead and create a new
environment for us to use Spyder with.
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
Click on the \emph{Environments} page located on the left hand side.
\end{enumerate}
\begin{figure}
\centering
\includegraphics{figures/anaconda_environment_page.png}
\caption{Environment Page}
\end{figure}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{1}
\tightlist
\item
At the bottom of the environments list, click \emph{Create}.
\end{enumerate}
\begin{figure}
\centering
\includegraphics{figures/anaconda_create_new_environment.png}
\caption{Create new environment}
\end{figure}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{2}
\item
Select the python checkbox.
\item
Select versions of python. At the time of making this tutorial the
latest version of Python is 3.xx.x. We will go ahead and use that one.
\item
Choose an appropriate name for your project. We will be creating an
environment for the Spyder IDE so we'll call it ``Spyder-env''.
\item
Click \emph{Create}.
\end{enumerate}
For more information see
\href{https://docs.anaconda.com/working-with-conda/environments/}{Anaconda
Environments} and
\href{https://docs.anaconda.com/navigator/tutorials/manage-environments/}{Managing
environment}.
\subsection{Package Management}\label{package-management}
Now that we have a clean environment configured, let us install some
library we will be using for this class.
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
Navigate to the environment page and select the environment we just
created in the previous section.
\end{enumerate}
\begin{figure}
\centering
\includegraphics{figures/anaconda_select_package_to_manage.png}
\caption{Select environment to manage}
\end{figure}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{1}
\tightlist
\item
Use the search bar in the top right corner to search for the following
packages:
\end{enumerate}
\begin{longtable}[]{@{}ll@{}}
\toprule\noalign{}
Library & Usage \\
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
numpy & Numerical computation \\
scipy & Scientific and techical computing \\
pandas & Data manipulation and analysis \\
matplotlib & Plots and visualizations \\
sympy & Symbolic mathematics \\
\end{longtable}
\emph{Note: The libraries list may change throughout the development of
this course}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{2}
\tightlist
\item
Check the boxes to install the selected packages to the current
environment.
\end{enumerate}
\subsection{Installing Applications}\label{installing-applications}
From the \emph{Home} page you can install applications, to the current
environment we created in the Environment section above. In this section
we will install Spyder IDE, but the process is exactly the same for
other applications.
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
Go to the \emph{Home} page.
\item
Select the desired environment. In our case, we select
\emph{Spyder-env}.
\item
From the Home page find the Spyder IDE tile. Click the \emph{Install}
button to start the download.
\end{enumerate}
\begin{figure}
\centering
\includegraphics{figures/anaconda_homepage.png}
\caption{Anaconda Home Page}
\end{figure}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\setcounter{enumi}{3}
\tightlist
\item
Once the download is complete, press \emph{Launch} to start the
applications.
\end{enumerate}
|