Skip to content

Commit 7e335f8

Browse files
committed
formatting
1 parent 61ca01c commit 7e335f8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

setup/01_optional-python-setup-preferences/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Otherwise, if Python is not installed or is an older version, you can install it
4848
<img src="https://sebastianraschka.com/images/LLMs-from-scratch-images/setup/uv-setup/python-not-found.png" width="500" height="auto" alt="No Python Found">
4949

5050
<br>
51+
5152
**Linux (Ubuntu/Debian)**
5253

5354
```bash
@@ -56,6 +57,7 @@ sudo apt install python3.10 python3.10-venv python3.10-dev
5657
```
5758

5859
<br>
60+
5961
**macOS**
6062

6163
If you use Homebrew, install Python with:
@@ -72,6 +74,7 @@ I recommend installing a Python version that is at least two versions older than
7274
<img src="https://sebastianraschka.com/images/LLMs-from-scratch-images/setup/uv-setup/python-version.png" width="700" height="auto" alt="Python version">
7375

7476
<br>
77+
7578
**Windows**
7679

7780
Download and run the installer from the official website: [https://www.python.org/downloads/](https://www.python.org/downloads/).
@@ -87,20 +90,23 @@ I recommend installing a Python version that is at least 2 versions older than t
8790
I highly recommend installing Python packages in a separate virtual environment to avoid modifying system-wide packages that your OS may depend on. To create a virtual environment in the current folder, follow the three steps below.
8891

8992
<br>
93+
9094
**1. Install uv**
9195

9296
```bash
9397
pip install uv
9498
```
9599

96100
<br>
101+
97102
**2. Create the virtual environment**
98103

99104
```bash
100105
uv venv --python=python3.10
101106
```
102107

103108
<br>
109+
104110
**3. Activate the virtual environment**
105111

106112
```bash
@@ -146,6 +152,7 @@ uv pip install -U -r https://raw.githubusercontent.com/rasbt/LLMs-from-scratch/r
146152
<img src="https://sebastianraschka.com/images/LLMs-from-scratch-images/setup/uv-setup/uv-install.png" width="700" height="auto" alt="Uv install">
147153

148154
<br>
155+
149156
**Finalizing the setup**
150157

151158
That’s it! Your environment should now be ready for running the code in the repository.
@@ -169,6 +176,7 @@ uv pip install packagename
169176
If problems persist, consider [opening a discussion](https://github.com/rasbt/LLMs-from-scratch/discussions) on GitHub or working through the *Option 2: Using Conda* section below.
170177

171178
<br>
179+
172180
**Start working with the code**
173181

174182
Once everything is set up, you can start working with the code files. For instance, launch [JupyterLab](https://jupyterlab.readthedocs.io/en/latest/) by running:

setup/01_optional-python-setup-preferences/native-uv.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ In this tutorial, I am using a computer running macOS, but this workflow is simi
1313
Uv can be installed as follows, depending on your operating system.
1414

1515
<br>
16+
1617
**macOS and Linux**
1718

1819
```bash
@@ -26,6 +27,7 @@ wget -qO- https://astral.sh/uv/install.sh | sh
2627
```
2728

2829
<br>
30+
2931
**Windows**
3032

3133
```bash
@@ -75,6 +77,7 @@ uv add packaging
7577
Alternatively, you can still install the dependencies directly from the repository using `uv pip install`. Note that this requires creating and activating the virtual environment manually:
7678

7779
<br>
80+
7881
**1. Create a new virtual environment**
7982

8083
Run the following command to manually create a new virtual environment, which will be saved via a new `.venv` subfolder:
@@ -84,6 +87,7 @@ uv venv --python=python3.10
8487
```
8588

8689
<br>
90+
8791
**2. Activate virtual environment**
8892

8993
Next, we need to activate this new virtual environment.
@@ -101,6 +105,7 @@ On Windows (PowerShell):
101105
```
102106

103107
<br>
108+
104109
**3. Install dependencies**
105110

106111
Finally, we can install dependencies from a remote location using the `uv pip` interface:
@@ -115,6 +120,7 @@ uv pip install -U -r https://raw.githubusercontent.com/rasbt/LLMs-from-scratch/r
115120
## 4. Run Python code
116121

117122
<br>
123+
118124
**Finalizing the setup**
119125

120126
Your environment should now be ready to run the code in the repository.
@@ -153,6 +159,7 @@ python setup/02_installing-python-libraries/python_environment_check.py
153159
```
154160

155161
<br>
162+
156163
**Launching JupyterLab**
157164

158165
You can launch a JupyterLab instance via:

0 commit comments

Comments
 (0)