mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Merge pull request #796 from PeterDaveHello/patch-1
Syntax highlight in README.md
This commit is contained in:
commit
4f719b7909
1 changed files with 27 additions and 22 deletions
23
README.md
23
README.md
|
@ -190,18 +190,19 @@ easy to fork and contribute any changes back upstream.
|
||||||
pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access
|
pyenv repo is cloned and add `$PYENV_ROOT/bin` to your `$PATH` for access
|
||||||
to the `pyenv` command-line utility.
|
to the `pyenv` command-line utility.
|
||||||
|
|
||||||
|
```sh
|
||||||
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
|
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
|
||||||
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
|
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
|
||||||
|
```
|
||||||
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
||||||
**Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
**Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
||||||
|
|
||||||
3. **Add `pyenv init` to your shell** to enable shims and autocompletion.
|
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
|
Please make sure `eval "$(pyenv init -)"` is placed toward the end of the shell
|
||||||
configuration file since it manipulates `PATH` during the initialization.
|
configuration file since it manipulates `PATH` during the initialization.
|
||||||
|
```sh
|
||||||
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
|
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
|
||||||
|
```
|
||||||
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
**Zsh note**: Modify your `~/.zshenv` file instead of `~/.bash_profile`.
|
||||||
**Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
**Ubuntu and Fedora note**: Modify your `~/.bashrc` file instead of `~/.bash_profile`.
|
||||||
|
|
||||||
|
@ -213,14 +214,14 @@ easy to fork and contribute any changes back upstream.
|
||||||
|
|
||||||
4. **Restart your shell so the path changes take effect.**
|
4. **Restart your shell so the path changes take effect.**
|
||||||
You can now begin using pyenv.
|
You can now begin using pyenv.
|
||||||
|
```sh
|
||||||
$ exec $SHELL
|
$ exec $SHELL
|
||||||
|
```
|
||||||
5. **Install Python versions into `$PYENV_ROOT/versions`.**
|
5. **Install Python versions into `$PYENV_ROOT/versions`.**
|
||||||
For example, to download and install Python 2.7.8, run:
|
For example, to download and install Python 2.7.8, run:
|
||||||
|
```sh
|
||||||
$ pyenv install 2.7.8
|
$ pyenv install 2.7.8
|
||||||
|
```
|
||||||
**NOTE:** If you need to pass configure option to build, please use
|
**NOTE:** If you need to pass configure option to build, please use
|
||||||
```CONFIGURE_OPTS``` environment variable.
|
```CONFIGURE_OPTS``` environment variable.
|
||||||
|
|
||||||
|
@ -239,16 +240,20 @@ upgrade your installation at any time using git.
|
||||||
|
|
||||||
To upgrade to the latest development version of pyenv, use `git pull`:
|
To upgrade to the latest development version of pyenv, use `git pull`:
|
||||||
|
|
||||||
|
```sh
|
||||||
$ cd ~/.pyenv
|
$ cd ~/.pyenv
|
||||||
$ git pull
|
$ git pull
|
||||||
|
```
|
||||||
|
|
||||||
To upgrade to a specific release of pyenv, check out the corresponding tag:
|
To upgrade to a specific release of pyenv, check out the corresponding tag:
|
||||||
|
|
||||||
|
```sh
|
||||||
$ cd ~/.pyenv
|
$ cd ~/.pyenv
|
||||||
$ git fetch
|
$ git fetch
|
||||||
$ git tag
|
$ git tag
|
||||||
v0.1.0
|
v0.1.0
|
||||||
$ git checkout v0.1.0
|
$ git checkout v0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
### Uninstalling pyenv
|
### Uninstalling pyenv
|
||||||
|
|
||||||
|
@ -266,9 +271,9 @@ uninstall from the system.
|
||||||
2. To completely **uninstall** pyenv, perform step (1) and then remove
|
2. To completely **uninstall** pyenv, perform step (1) and then remove
|
||||||
its root directory. This will **delete all Python versions** that were
|
its root directory. This will **delete all Python versions** that were
|
||||||
installed under `` `pyenv root`/versions/ `` directory:
|
installed under `` `pyenv root`/versions/ `` directory:
|
||||||
|
```sh
|
||||||
rm -rf `pyenv root`
|
rm -rf `pyenv root`
|
||||||
|
```
|
||||||
If you've installed pyenv using a package manager, as a final step
|
If you've installed pyenv using a package manager, as a final step
|
||||||
perform the pyenv package removal. For instance, for Homebrew:
|
perform the pyenv package removal. For instance, for Homebrew:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue