Skip to content

Commit 0f2d659

Browse files
authored
Update instructions for installation in README (pyenv#1580)
Describe more clearly for different shells.
1 parent 18fe640 commit 0f2d659

1 file changed

Lines changed: 25 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,31 @@ easy to fork and contribute any changes back upstream.
192192
pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access
193193
to the `pyenv` command-line utility.
194194

195-
```sh
196-
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
197-
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
198-
```
199-
- **Zsh note**: Modify your `~/.zshrc` file instead of `~/.bash_profile`.
200-
- **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
201-
- **Proxy note**: If you use a proxy, export `http_proxy` and `HTTPS_PROXY` too.
195+
- For **bash**:
196+
~~~ bash
197+
$ echo 'export PYENV_ROOT="$HOME/.pyenv' >> ~/.bash_profile
198+
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
199+
~~~
200+
201+
- For **Ubuntu Desktop**:
202+
~~~ bash
203+
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
204+
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
205+
~~~
206+
207+
- For **Zsh**:
208+
~~~ zsh
209+
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
210+
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
211+
~~~
212+
213+
- For **Fish shell**:
214+
~~~ fish
215+
$ set -Ux PYENV_ROOT $HOME/.pyenv
216+
$ set -Ux fish_user_paths $PYENV_ROOT/bin $fish_user_paths
217+
~~~
218+
219+
- **Proxy note**: If you use a proxy, export `http_proxy` and `HTTPS_PROXY` too.
202220

203221
3. **Add `pyenv init` to your shell** to enable shims and autocompletion.
204222
Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell

0 commit comments

Comments
 (0)