Skip to content

Commit 92f74b9

Browse files
authored
Merge pull request #9 from JimMadge/jupyter_os_instructions
Add windows installation instructions
2 parents 3491225 + 73713b9 commit 92f74b9

4 files changed

Lines changed: 71 additions & 22 deletions

File tree

content/lessons/executable.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ kernelspec:
1111

1212
MyST supports a number of ways to include executable content in your project.
1313

14+
```{tip}
15+
Instructions are provided here for Jupyter Lab, however, you can use any IDE you are comfortable with. An explanation is provided on the [Software](#software) page.
16+
```
17+
1418
## Installing Jupyter
1519

1620
Executable content in MyST is processed by a [Jupyter](xref:jupyter) server and appropriate [kernel](https://docs.jupyter.org/en/latest/glossary.html#term-kernel).
@@ -19,12 +23,40 @@ In this lesson, we will run a local Jupyter server to execute code cells.
1923
A pip requirements file, `requirements.txt` in the root of the repository specifies all of the dependencies you need.
2024
You can install all of these in a virtual environment using `pip` and then launch Jupyter.
2125

26+
::::{tab-set}
27+
:::{tab-item} Linux and MacOS
2228
```console
2329
python3 -m venv ./venv
2430
source ./venv/bin/activate
2531
pip install -r requirements.txt
2632
jupyter lab
2733
```
34+
:::
35+
:::{tab-item} Windows
36+
```console
37+
python -m venv venv
38+
```
39+
40+
For Command Prompt
41+
42+
```console
43+
venv\Scripts\activate.bat
44+
```
45+
46+
For PowerShell
47+
48+
```console
49+
venv\Scripts\activate.ps1
50+
```
51+
52+
Then
53+
54+
```console
55+
pip install -r requirements.txt
56+
jupyter lab
57+
```
58+
:::
59+
::::
2860

2961
This will automatically open the Jupyter Lab interface (at [localhost:8888](http://localhost:8888)) in your browser, which we will use later.
3062

content/lessons/your_turn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
(lessons-start)=
22
# Create your first Jupyter Book 2
33

4-
Now it's your turn to get going with creating content in a Jupyter Book.
4+
Now it's your turn to get going creating content in a Jupyter Book.
55

66
There are some conditions to meet before you can get started:
77

8-
- Programming experience is not necessary, but it does make things a bit easier.
8+
- Programming and Git experience are not strictly necessary, but it does make things a bit easier.
99
- A free [GitHub](https://github.com/) account.
1010
- A little bit of patience, it's a steep learning curve.
1111

1212
Optional:
13-
- [Software](#software) to write your code in, such as [Visual Studio Code](https://code.visualstudio.com/) (VSC).
13+
- [Software](#software) to write your code in, such as Jupyter Lab or [Visual Studio Code](https://code.visualstudio.com/) (VSC).
1414

1515
:::{tip}
1616
If you are feeling confident and would rather start building a document from scratch using the CLI on your computer, you can look at [the advanced start](#advanced-start) option 🌶.
1717
:::
1818

19-
We provide instructions for building using the GitHub dev IDE, as well as building locally. For the latter we assume knowledge about VSC, and the use of git.
19+
We provide instructions for building using the GitHub development IDE, as well as building locally. For the latter we assume knowledge about VSC, and the use of git.
2020

2121
Ready? Let's get started…

content/software.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
(software)=
22
# Software
33

4-
## VSC
5-
A popular code editor is [Visual Studio Code](https://code.visualstudio.com/). It allows you to program in different languages, where it recognizes the commands in that language and adjusts the FONT so that it becomes better readable. Moreover, it allows you to install various packages (such as Jupyter Notebook). It also integrates GIT and allows to code using Co-Pilot, an AI pair programmer. We advise to use VSC as it allows for multiple programming languages.
4+
This page provides an overview of commonly used software, with limited instructions for using them.
65

7-
### Terminal
8-
The terminal in Visual Studio Code (VSC) is a tool that lets you interact with your computer's command line directly within the editor. It's used to run commands, scripts, or programs without leaving the coding environment. For example, you can compile code, run a development server, install dependencies, or manage files. It's very helpful for developers because it allows you to code and execute commands in one place, streamlining your workflow.
6+
## Integrated Development Environment (IDE)
7+
8+
An IDE is required to complete many of the exercises in this workshop. Many of them could be completed in a simple text editor, however, an IDE that includes features such as version control with Git, environment management and a CLI would be useful. As such, the instructions herein often refer to Jupyter Lab. However, you can choose your own IDE, noting that the main requirements are dictated by the use of Jupyeter Notebook (`*.ipynb`) files:
9+
10+
- ability to edit notebooks natively (i.e., not editing the raw JSON),
11+
- access to a Jupyter server and Python kernel for executing notebooks.
12+
13+
### Jupyter Lab
14+
15+
To run Jupyter Notebooks we can use IDE’s as Jupyter Notebook or Jupyter Lab. Jupyter Notebook is a web-based interface that allows users to create and share documents with live code, visualizations, and narrative text in a linear format. Jupyter Lab, on the other hand, is a more advanced interface offering a flexible and modular environment with multiple panels, including notebooks, terminals, and text editors, providing a more versatile experience for interactive computing. I prefer to use Jupyter lab.
16+
17+
### GitHub web-based editor
18+
19+
The github.dev web editor makes it possible to edit files directly in the browser. This is an excellent option if you are unable to install software on your computer. To activate it, simply navigate to a GitHub repository and press `.`. It's really that easy!
20+
21+
```{tip}
22+
Note that while this IDE can be used for many of the exercises in this workshop, and you can _edit_ Jupyter Notebook files, you will _not_ be able to use iexecute notebooks directly in the browser (however, notebooks will be executed during build in the GitHub Actions workflow).
23+
```
24+
25+
You can find out more about this useful tool [here](https://docs.github.com/en/codespaces/the-githubdev-web-based-editor).
26+
27+
### VSC
28+
A popular code editor is [Visual Studio Code](https://code.visualstudio.com/) (VSC). It allows you to program in different languages, where it recognizes the commands in that language and adjusts the FONT so that it becomes better readable. Moreover, it allows you to install various packages (such as Jupyter Notebook). It also integrates GIT and allows to code using Co-Pilot, an AI pair programmer. We advise to use VSC as it allows for multiple programming languages.
29+
30+
#### Terminal
31+
The terminal in VSC is a tool that lets you interact with your computer's command line directly within the editor. It's used to run commands, scripts, or programs without leaving the coding environment. For example, you can compile code, run a development server, install dependencies, or manage files. It's very helpful for developers because it allows you to code and execute commands in one place, streamlining your workflow.
932

1033
```{figure} figures/VSCterminal.*
1134
---
@@ -15,10 +38,10 @@ width: 100%
1538
The VSC terminal to interact with the computer using the command line
1639
```
1740

18-
### Extensions
41+
#### Extensions
1942
Extensions in Visual Studio Code (VSC) are powerful add-ons that enhance the functionality of the editor by providing additional features, tools, and support for various programming languages, frameworks, and technologies. Extensions allow you to customize and tailor VSC to suit your specific development needs.
2043

21-
#### How to Install Extensions:
44+
##### How to Install Extensions:
2245
- Access Extensions View:
2346
* Click on the Extensions icon in the Activity Bar on the side (or press Ctrl+Shift+X / Cmd+Shift+X).
2447

@@ -31,7 +54,7 @@ Extensions in Visual Studio Code (VSC) are powerful add-ons that enhance the fun
3154
- Manage Installed Extensions:
3255
* You can view, enable, disable, or uninstall extensions from the same Extensions view.
3356

34-
#### Popular Extensions in VSC:
57+
##### Popular Extensions in VSC:
3558
* Python: Provides linting, debugging, IntelliSense, and more for Python development.
3659
* Jupyter: Provides support for Jupyter notebooks within VSC.
3760
* Arduino: Provides support for programming in Arduino.
@@ -41,12 +64,10 @@ Extensions in Visual Studio Code (VSC) are powerful add-ons that enhance the fun
4164
* MyST-Markdown: The official Markdown syntax extension
4265

4366

44-
## MystMD
45-
67+
## Requirements.txt
4668

69+
A `requirements.txt` file is included for this workshop that contains the basic dependencies needed to complete it. Note in particular that
4770

48-
49-
### Requirements.txt
5071
We included a [requirements.txt](../..requirements.txt) file with all dependencies that are likely to be used.
5172
These include:
5273
| Package | Description |
@@ -63,12 +84,5 @@ These include:
6384

6485
If you are sure you want to install these dependencies, download the file, navigate through the correct folder and use `pip install -r requirements.txt`.
6586

66-
67-
68-
## Jupyter lab
69-
70-
We can make use of .ipynb files which are Jupyter Notebooks. To run these notebooks we can use IDE’s as Jupyter Notebook or Jupyter Lab. Jupyter Notebook is a web-based interface that allows users to create and share documents with live code, visualizations, and narrative text in a linear format. JupyterLab, on the other hand, is a more advanced interface offering a flexible and modular environment with multiple panels, including notebooks, terminals, and text editors, providing a more versatile experience for interactive computing. I prefer to use Jupyter lab.
71-
72-
7387
## Typst
7488
For this template we use Typst to produce a high quality pdf. If you want to create pdf's locally, you'll have to install Typst. Follow the [Typst installation instructions](https://github.com/typst/typst?tab=readme-ov-file#installation) for several options to install Typst. We strongly recommend using the latest releases of Typst. If you get a confusing Typst error, a good first step is to upgrade your version of Typst.

myst.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ project:
6565
CI/CD: Continuous Integration/Continuous Deployment
6666
GHA: GitHub Actions
6767
GH: GitHub
68+
IDE: Integrated Development Environment
69+
VSC: Visual Studio Code
70+
CLI: commmand line interface
6871

6972

7073
site:

0 commit comments

Comments
 (0)