Skip to content

Commit f9ac74f

Browse files
authored
Add pyenv path setup to configuration.md (#1260)
1 parent ffaf308 commit f9ac74f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

book/configuration.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,25 @@ $env.PATH = ($env.PATH | split row (char esep) | prepend '/opt/homebrew/bin')
163163
# Linux
164164
$env.PATH = ($env.PATH | split row (char esep) | prepend '/home/linuxbrew/.linuxbrew/bin')
165165
```
166+
167+
### Pyenv
168+
[Pyenv](https://github.com/pyenv/pyenv) is a popular Python version manager. To add it to your Nushell PATH:
169+
170+
#### MacOS or Linux
171+
```nu
172+
# MacOS or Linux
173+
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(pyenv root)/shims")
174+
```
175+
176+
#### Windows
177+
Windows users need to install [pyenv-win](https://github.com/pyenv-win/pyenv-win)
178+
and execute the `Get-Command pyenv` command in PowerShell to get the path of `pyenv.ps1` after the installation.
179+
180+
The result usually looks like: `C:\Users\<your-username>\.pyenv\pyenv-win\bin\pyenv.ps1`
181+
182+
Then add the path of pyenv to your Nushell PATH:
183+
```nu
184+
# Windows
185+
$env.Path = ($env.Path | split row (char esep) | prepend $"~/.pyenv/pyenv-win/bin/pyenv.ps1")
186+
```
187+

0 commit comments

Comments
 (0)