Skip to content

Commit 1775df7

Browse files
committed
Provide alternative line_profiler installation command for Zsh users
1 parent 4591178 commit 1775df7

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

episodes/profiling-lines.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ pip install line_profiler[all]
4949

5050
:::::::::::::::: spoiler
5151

52-
### Mac OS
52+
### Installation issues
5353

54-
If you are unable to install `line_profiler` via `pip` on MacOS. Instead it can be installed via `conda`.
54+
If you come across the error message `zsh: no matches found: line_profiler[all]`, try wrapping the package name in quotation marks:
55+
56+
```sh
57+
pip install 'line_profiler[all]'
58+
```
59+
60+
Alternatively, the package can be installed via `conda`.
5561

5662
```sh
5763
conda install line_profiler

learners/setup.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,17 @@ pip install shapely
5050

5151
:::::::::::::::: spoiler
5252

53-
### Mac OS (line_profiler)
53+
### Issues installing line_profiler
5454

55-
If you are unable to install `line_profiler` via `pip` on MacOS. Instead it can be installed via `conda`.
55+
If you use Zsh as your shell (which is the default on Mac OS), you may come across the error `zsh: no matches found: line_profiler[all]` when installing `line_profiler[all]`.
56+
In Zsh, we need to ensure that the square brackets are treated as standard characters; wrapping them in quotation marks resolves the issue.
57+
58+
```sh
59+
pip install 'line_profiler[all]'
60+
pip install pytest snakeviz numpy pandas matplotlib
61+
```
62+
63+
Alternatively, you can install `line_profiler` via `conda`.
5664

5765
```sh
5866
conda install -c conda-forge line_profiler

0 commit comments

Comments
 (0)