Update the installation notes to JupyterLab
This commit is contained in:
parent
759271b6a1
commit
e8cd8a7e63
6 changed files with 49 additions and 24 deletions
|
|
@ -156,7 +156,7 @@
|
|||
"\n",
|
||||
"A popular and beginner-friendly way is to install the [Anaconda Distribution](https://www.anaconda.com/distribution/) that not only ships Python and the standard library but comes pre-packaged with a lot of third-party libraries from the so-called \"scientific stack.\" Just go to the [download](https://www.anaconda.com/download/) page and install the latest version (i.e., *2019-10* with Python 3.7 at the time of this writing) for your operating system.\n",
|
||||
"\n",
|
||||
"Then, among others, you find an entry \"Jupyter Notebook\" in your start menu like below. Click on it to open a new tab in your web browser where you can switch between folders as you could in your computer's default file browser."
|
||||
"Then, among others, you will find an entry \"Anaconda Navigator\" in your start menu like below. Click on it."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"<img src=\"static/anaconda.png\" width=\"40%\">"
|
||||
"<img src=\"static/anaconda_start_menu.png\" width=\"30%\">"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -178,7 +178,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"To download the materials accompanying this book as a ZIP file, open this [GitHub repository](https://github.com/webartifex/intro-to-python) in a web browser and click on the green \"Clone or download\" button on the right. Then, unpack the ZIP file into a folder of your choosing (ideally somewhere within your user folder so that the files show up right away)."
|
||||
"A window opens showing you several applications that come with the Anaconda Distribution. Now, click on \"JupyterLab.\""
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"### Alternative Installation"
|
||||
"<img src=\"static/anaconda_navigator.png\" width=\"50%\">"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -200,7 +200,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"Python can also be installed in a \"pure\" way as obtained from its core development team. However, this is somewhat too \"advanced\" for a beginner who would then also be responsible for setting up all the third-party libraries needed to view this document. Plus, many of the involved steps are typed in a [terminal](https://en.wikipedia.org/wiki/Terminal_emulator) window, which tends to be a bit intimidating for most beginners."
|
||||
"A new tab in your web browser opens with the website being \"localhost\" and some number (e.g., 8888). This is the [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) application that is used to display and run the Jupyter notebooks mentioned above. On the left, you see the files and folders in your local user folder. This file browser works like any other. In the center, you have several options to launch a new notebook file."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"<img src=\"static/terminal.png\" width=\"50%\" align=\"center\">"
|
||||
"<img src=\"static/jupyter_lab.png\" width=\"50%\">"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -222,7 +222,7 @@
|
|||
}
|
||||
},
|
||||
"source": [
|
||||
"For more \"courageous\" beginners wanting to learn how to accomplish this, here is a rough sketch of the aspects to know. First, all Python releases are available for free on the official [download](https://www.python.org/downloads/) page for any supported operating system. Choose the latest one applicable, then download and install it (cf., the [instruction notes](https://wiki.python.org/moin/BeginnersGuide/Download)). As this only includes core Python and the standard library, the beginner then needs to learn about the [pip](https://pip.pypa.io/en/stable/) module. With the command `python -m pip install jupyter`, all necessary third-party libraries are installed (cf., more background [here](https://jupyter.readthedocs.io/en/latest/install.html)). However, this would be done in a *system-wide* fashion and is not recommended. Instead, the best practice is to create a so-called **virtual environment** with the [venv](https://docs.python.org/3/library/venv.html) module with which the installed third-party packages are *isolated* on a per-project basis (the command `python -m venv env-name` creates a virtual environment called \"env-name\"). This tactic is employed to avoid a situation known as **[dependency hell](https://en.wikipedia.org/wiki/Dependency_hell)**. Once created, the virtual environment must then be activated each time before resuming work in each terminal (with the command `source env-name/bin/activate`). While there exist convenience tools that automate parts of this (e.g., [poetry](https://poetry.eustace.io/docs/) or [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/)), it only distracts a beginner from studying the Python language. Yet, it is still worthwhile to have heard about these terms and concepts as many online resources often implicitly assume the user to know about them."
|
||||
"Next, to download the materials accompanying this book as a ZIP file, open this [GitHub repository](https://github.com/webartifex/intro-to-python) in a web browser, and click on the green \"Clone or download\" button on the top right. Then, unpack the ZIP file into a folder of your choosing, ideally somewhere within your personal user folder so that the files show up right away in JupyterLab."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue