Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyenv path setup to configuration.md #1260

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions book/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,25 @@ $env.PATH = ($env.PATH | split row (char esep) | prepend '/opt/homebrew/bin')
# Linux
$env.PATH = ($env.PATH | split row (char esep) | prepend '/home/linuxbrew/.linuxbrew/bin')
```

### Pyenv
[Pyenv](https://github.com/pyenv/pyenv) is a popular Python version manager. To add it to your Nushell PATH:

#### MacOS or Linux
```nu
# MacOS or Linux
$env.PATH = ($env.PATH | split row (char esep) | prepend $"(pyenv root)/shims")
```

#### Windows
Windows users need to install [pyenv-win](https://github.com/pyenv-win/pyenv-win)
and execute the `Get-Command pyenv` command in PowerShell to get the path of `pyenv.ps1` after the installation.

The result usually looks like: `C:\Users\<your-username>\.pyenv\pyenv-win\bin\pyenv.ps1`

Then add the path of pyenv to your Nushell PATH:
```nu
# Windows
$env.Path = ($env.Path | split row (char esep) | prepend $"~/.pyenv/pyenv-win/bin/pyenv.ps1")
```

Loading