-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathGetting_Started_With_IDEs_and_Notebooks.html
231 lines (211 loc) · 14.3 KB
/
Getting_Started_With_IDEs_and_Notebooks.html
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta content="Topic: Integrated Development Environments, Difficulty: Easy, Category: Tools" name="description" />
<meta content="python, introduction, IDE, PyCharm, VSCode, Jupyter, recommendation, tools" name="keywords" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Setting Up a Development Environment — Python Like You Mean It</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/my_theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-115029372-1"></script>
<script src="../_static/gtag.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script>window.MathJax = {"tex": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true}, "options": {"ignoreHtmlClass": "tex2jax_ignore|mathjax_ignore|document", "processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Module 2: The Essentials of Python" href="../module_2.html" />
<link rel="prev" title="Jupyter Notebooks" href="Jupyter_Notebooks.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> Python Like You Mean It
</a>
<div class="version">
1.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Table of Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../intro.html">Python Like You Mean It</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../module_1.html">Module 1: Getting Started with Python</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="SiteFormatting.html">A Quick Guide to Formatting</a></li>
<li class="toctree-l2"><a class="reference internal" href="GettingStartedWithPython.html">Introducing the Python Programming Language</a></li>
<li class="toctree-l2"><a class="reference internal" href="Installing_Python.html">Installing Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="Informal_Intro_Python.html">An Informal Introduction to Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="Jupyter_Notebooks.html">Jupyter Notebooks</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Setting Up a Development Environment</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#What-You-Will-Learn">What You Will Learn</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Integrated-Development-Environments">Integrated Development Environments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Recommended-IDEs">Recommended IDEs</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#Visual-Studio-Code">Visual Studio Code</a></li>
<li class="toctree-l4"><a class="reference internal" href="#PyCharm">PyCharm</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../module_2.html">Module 2: The Essentials of Python</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module_2_problems.html">Module 2: Problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module_3.html">Module 3: The Essentials of NumPy</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module_3_problems.html">Module 3: Problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module_4.html">Module 4: Object Oriented Programming</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module_5.html">Module 5: Odds and Ends</a></li>
<li class="toctree-l1"><a class="reference internal" href="../changes.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Python Like You Mean It</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> »</li>
<li><a href="../module_1.html">Module 1: Getting Started with Python</a> »</li>
<li>Setting Up a Development Environment</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/Module1_GettingStartedWithPython/Getting_Started_With_IDEs_and_Notebooks.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<style>
/* CSS overrides for sphinx_rtd_theme */
/* 24px margin */
.nbinput.nblast.container,
.nboutput.nblast.container {
margin-bottom: 19px; /* padding has already 5px */
}
/* ... except between code cells! */
.nblast.container + .nbinput.container {
margin-top: -19px;
}
.admonition > p:before {
margin-right: 4px; /* make room for the exclamation icon */
}
/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
text-align: unset;
}
</style>
<div class="section" id="Setting-Up-a-Development-Environment">
<h1>Setting Up a Development Environment<a class="headerlink" href="#Setting-Up-a-Development-Environment" title="Permalink to this headline"></a></h1>
<div class="section" id="What-You-Will-Learn">
<h2>What You Will Learn<a class="headerlink" href="#What-You-Will-Learn" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>An IDE is a sophisticated text editor that allows you edit, run, and debug code.</p></li>
<li><p>The Python shell is an interface for typing Python code and executing it directly in your computer’s terminal.</p></li>
<li><p>The IPython shell is a much nicer version of the Python shell - it provides syntax highlighting, autocompletion, and other features.</p></li>
<li><p>The Jupyter Notebook is a powerful tool for prototyping and experimenting with code, as well as visualizing data and writing nicely-formatted text. We will be using this throughout the course.</p></li>
</ul>
</div>
<div class="section" id="Integrated-Development-Environments">
<h2>Integrated Development Environments<a class="headerlink" href="#Integrated-Development-Environments" title="Permalink to this headline"></a></h2>
<p>In Section 1 of this module, we learned that a Python script is simply a text file that contains Python code. Aside from using a <code class="docutils literal notranslate"><span class="pre">.py</span></code> suffix for the filename, there is nothing that differentiates this sort of file from any other text file. That being said, it is not a good idea to use a simple text editor to write Python code (and it is a big mistake use word-processing software, like Microsoft Word, to do so). Instead we want an “integrated development environment” (IDE) that will facilitate
our code-writing.</p>
<p>First and foremost, a good IDE will provide a text editor that will:</p>
<ul class="simple">
<li><p>check your code for syntax errors (a misspelled function name, a reference to an undefined variable, etc)</p></li>
<li><p>colorize your code so that it is easy to distinguish, for instance, numbers from character strings.</p></li>
<li><p>enable you to easily look up documentation and definitions for functions that you are using.</p></li>
<li><p>autocomplete the names of variables and functions as you are typing them.</p></li>
</ul>
<p>An IDE also often provides debugging tools so that you can test your code; it will also typically interface with version-control software, like Git, so that you can keep track of versions of your code as you modify it. We will not discuss these useful, but more advanced features here.</p>
</div>
<div class="section" id="Recommended-IDEs">
<h2>Recommended IDEs<a class="headerlink" href="#Recommended-IDEs" title="Permalink to this headline"></a></h2>
<p>There are many excellent IDEs that can be configured to work well with Python. Two IDEs that we endorse are:</p>
<div class="section" id="Visual-Studio-Code">
<h3>Visual Studio Code<a class="headerlink" href="#Visual-Studio-Code" title="Permalink to this headline"></a></h3>
<p><a class="reference external" href="https://code.visualstudio.com/">Visual Studio Code</a> (with the <a class="reference external" href="https://code.visualstudio.com/docs/languages/python">Python extension</a>) is a lightweight, highly customizable IDE that works with many different languages.</p>
<p>Note: if you decide to use VSCode to do Python development, it is highly recommended that you install Microsoft’s <a class="reference external" href="https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance">PyLance</a> extension. This adds many useful features to the IDE that will make writing Python code a more delightful experience.</p>
<p><strong>Pros</strong></p>
<ul class="simple">
<li><p>Lightweight and elegant.</p></li>
<li><p>Completely free.</p></li>
<li><p>Works with many different languages, so you only need to familiarize yourself with one IDE if you are a polyglot programmer.</p></li>
<li><p>Offers a huge number of extensions that can be downloaded to add functionality to the editor; these are created by a large community of open-source developers.</p></li>
<li><p><a class="reference external" href="https://code.visualstudio.com/docs/python/jupyter-support">Has native support for Jupyter notebooks</a>, meaning that you get VSCode’s intellisense, debugger, and ability to inspect variables, all in a notebook.</p></li>
<li><p>Provides incredibly robust <a class="reference external" href="https://code.visualstudio.com/docs/remote/remote-overview">remote coding</a> and <a class="reference external" href="https://visualstudio.microsoft.com/services/live-share/">collaborative coding</a> capabilities.</p></li>
</ul>
<p><strong>Cons</strong></p>
<ul class="simple">
<li><p>Configuring VSCode for Python development can have a moderate learning curve for newcomers.</p></li>
</ul>
</div>
<div class="section" id="PyCharm">
<h3>PyCharm<a class="headerlink" href="#PyCharm" title="Permalink to this headline"></a></h3>
<p><a class="reference external" href="https://www.jetbrains.com/pycharm/download">PyCharm</a> is a powerful and highly-polished IDE dedicated to developing Python code.</p>
<p><strong>Pros</strong></p>
<ul class="simple">
<li><p>Works well out-of-the-box.</p></li>
<li><p>Long-supported by professionals and thus is very reliable.</p></li>
<li><p>Highly configurable.</p></li>
<li><p>Fully-featured, with an excellent debugger, context-dependent “intellisense”, type-inference, and more.</p></li>
<li><p>The free “community version” is extremely robust and feature-rich.</p></li>
<li><p>Generally provides an extremely high-quality and responsive experience for doing Python development.</p></li>
</ul>
<p><strong>Cons</strong></p>
<ul class="simple">
<li><p>Can be resource-heavy, especially for a laptop.</p></li>
<li><p>May be overwhelming to new users (but has good documentation and tutorials).</p></li>
<li><p>Jupyter notebook support requires the premium version of PyCharm, making it inaccessible to newcomers.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title fa fa-exclamation-circle"><strong>Takeaway</strong>:</p>
<p>Integrated Development Environments (IDEs) provide powerful tools for helping you write well-formatted and typo-free code. We recommend using PyCharm Community Edition or Visual Studio Code (with the Python extension installed) for your Python IDE.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Jupyter_Notebooks.html" class="btn btn-neutral float-left" title="Jupyter Notebooks" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../module_2.html" class="btn btn-neutral float-right" title="Module 2: The Essentials of Python" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2021, Ryan Soklaski.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>