mirror of
https://github.com/pyenv/pyenv.git
synced 2025-04-07 12:34:19 +00:00
Merge pull request #1785 from John15321/more_general_instal_readme
more general installation readme instructions
This commit is contained in:
commit
569992f25f
1 changed files with 20 additions and 6 deletions
26
README.md
26
README.md
|
@ -232,12 +232,26 @@ easy to fork and contribute any changes back upstream.
|
|||
3. **Add `pyenv init` to your shell** to enable shims and autocompletion.
|
||||
Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell
|
||||
configuration file since it manipulates `PATH` during the initialization.
|
||||
```sh
|
||||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
|
||||
```
|
||||
- **Zsh note**: Modify your `~/.zshrc` file instead of `~/.bash_profile`.
|
||||
- **fish note**: Use `pyenv init - | source` instead of `eval (pyenv init -)`.
|
||||
- **Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
||||
|
||||
- For **bash**:
|
||||
~~~ bash
|
||||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
|
||||
~~~
|
||||
|
||||
- For **Ubuntu Desktop** and **Fedora**:
|
||||
~~~ bash
|
||||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- For **Zsh**:
|
||||
~~~ zsh
|
||||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
- For **Fish shell**:
|
||||
~~~ fish
|
||||
echo -e '\n\n# pyenv init\nif command -v pyenv 1>/dev/null 2>&1\n pyenv init - | source\nend' >> ~/.config/fish/config.fish
|
||||
~~~
|
||||
|
||||
**General warning**: There are some systems where the `BASH_ENV` variable is configured
|
||||
to point to `.bashrc`. On such systems you should almost certainly put the above mentioned line
|
||||
|
|
Loading…
Add table
Reference in a new issue