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
Copy file name to clipboardExpand all lines: docs/src/appendix/index.md
+29-18Lines changed: 29 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,8 @@
1
-
```# Advanced installation
1
+
# Advanced installation
2
+
3
+
While there are numerous ways to install and configure Python for data analysis, advanced users like to take advantage of modern Python tools to have more control over when and where code is installed on their system.
4
+
5
+
This guide will demonstrate how to install everything your computer needs using either traditional tools like pipenv or modern alternatives like uv.llation
2
6
3
7
While there are numerous ways to install and configure Python for data analysis, advanced users like to take advantage of modern Python tools to have more control over when and where code is installed on their system.
4
8
@@ -94,7 +98,7 @@ pip install uv
94
98
95
99
## The `pipenv` environment manager
96
100
97
-
Our notebook depends on a set of Python tools that we'll need to install before we can run the code. They are the [JupyterLab](https://jupyter.org/)computational notebook, the [requests](https://docs.python-requests.org/en/latest/) library for downloading webpages and [BeautifulSoup](https://beautiful-soup-4.readthedocs.io/en/latest/), a handy utility for parsing data out of HTML.
101
+
Our tutorial depends on a set of Python tools that we'll need to install before we can run the code. They include [pandas](https://pandas.pydata.org/)for data manipulation, [matplotlib](https://matplotlib.org/) and [seaborn](https://seaborn.pydata.org/)for plotting, and [altair](https://altair-viz.github.io/)for interactive visualizations.
98
102
99
103
By default, Python's third-party packages are all installed in a shared "global" folder somewhere in the depths of your computer. By default, every Python project on your computer draws from this same set of installed programs.
100
104
@@ -219,7 +223,7 @@ cd Code/first-python-notebook
219
223
If you're using uv, you can install all the required packages at once:
220
224
221
225
```bash
222
-
uv add pandas matplotlib seaborn jupyter altair
226
+
uv add pandas matplotlib seaborn altair
223
227
```
224
228
225
229
This will:
@@ -265,29 +269,35 @@ You should see the computer spit out everything you have installed. You’ll not
265
269
266
270
Next we will install the extra Python packages used during the tutorial with pipenv.
267
271
268
-
We will use pipenv to install JupyterLab, the web-based interactive development environment for Jupyter notebooks, code and data.
272
+
We will use pipenv to install pandas, the powerful data manipulation library:
269
273
270
274
```bash
271
-
pipenv install jupyterlab
275
+
pipenv install pandas
272
276
```
273
277
274
-
We'll install pandas the same way:
278
+
We'll install matplotlib for basic plotting:
275
279
276
-
```python
277
-
pipenv install pandas
280
+
```bash
281
+
pipenv install matplotlib
278
282
```
279
283
280
-
Install altair too.
284
+
Add seaborn for statistical visualizations:
281
285
282
-
```python
286
+
```bash
287
+
pipenv install seaborn
288
+
```
289
+
290
+
Install altair for interactive charts:
291
+
292
+
```bash
283
293
pipenv install altair
284
294
```
285
295
286
-
````{note}
287
-
You can install more than one package at once. For instance, all three of the packages above could be added like so:
296
+
```{note}
297
+
You can install more than one package at once. For instance, all four of the packages above could be added like so:
288
298
289
299
```bash
290
-
pipenv install jupyterlab pandas altair
300
+
pipenv install pandas matplotlib seaborn altair
291
301
```
292
302
````
293
303
@@ -313,15 +323,16 @@ This will start a Python interpreter with all your installed packages available.
313
323
314
324
### Using pipenv
315
325
316
-
Now we can use pipenv's run command to start JupyterLab from your terminal.
326
+
Now you can use pipenv's run command to start a Python interpreter from your terminal:
317
327
318
328
```bash
319
-
pipenv run jupyter lab
329
+
pipenv run python
320
330
```
321
331
322
-
That will open up a new tab in your default web browser that looks something like this:
332
+
This will start an interactive Python session with all your installed packages available. You can also open VS Code in your project directory and it will detect your pipenv environment:
323
333
324
-
```{image} /_static/jupyterlabdesktop.png
334
+
```bash
335
+
code .
325
336
```
326
337
327
-
Click the "Python 3" button in the middle panel and create a new Python 3 notebook. You should now be able to pick up in [chapter two](../notebook.md) and start work from there.
338
+
Once VS Code is open, you can create Python files and run them interactively using the `# %%` cell markers. You should now be able to pick up with the [VS Code tutorial](../notebook.md) and start working from there.
0 commit comments