You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
87
90
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.
That’s it! Your environment should now be ready for running the code in the repository.
@@ -169,6 +176,7 @@ uv pip install packagename
169
176
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.
170
177
171
178
<br>
179
+
172
180
**Start working with the code**
173
181
174
182
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:
Copy file name to clipboardExpand all lines: setup/01_optional-python-setup-preferences/native-uv.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ In this tutorial, I am using a computer running macOS, but this workflow is simi
13
13
Uv can be installed as follows, depending on your operating system.
14
14
15
15
<br>
16
+
16
17
**macOS and Linux**
17
18
18
19
```bash
@@ -26,6 +27,7 @@ wget -qO- https://astral.sh/uv/install.sh | sh
26
27
```
27
28
28
29
<br>
30
+
29
31
**Windows**
30
32
31
33
```bash
@@ -75,6 +77,7 @@ uv add packaging
75
77
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:
76
78
77
79
<br>
80
+
78
81
**1. Create a new virtual environment**
79
82
80
83
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
84
87
```
85
88
86
89
<br>
90
+
87
91
**2. Activate virtual environment**
88
92
89
93
Next, we need to activate this new virtual environment.
@@ -101,6 +105,7 @@ On Windows (PowerShell):
101
105
```
102
106
103
107
<br>
108
+
104
109
**3. Install dependencies**
105
110
106
111
Finally, we can install dependencies from a remote location using the `uv pip` interface:
0 commit comments