Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,19 @@ but [U+2502/"Box Drawings Light Vertical"](https://www.compart.com/en/unicode/U+
### How can I make the Python Launcher use my default Python version from pyenv?

If you're using [pyenv](https://github.com/pyenv/pyenv) to manage your Python
versions, you'll want to grab the major and minor version from the first Python
version listed in your default
[pyenv version file](https://github.com/pyenv/pyenv#choosing-the-python-version).
versions, you'll want to set the version the Launcher uses to the pyenv
[global version](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global).

You can add this line to your `.zshrc` or `.bashrc` file:
Add this line to your `.zshrc` or `.bashrc` file:

```sh
export PY_PYTHON=$(head -n 1 $(pyenv root)/version | cut -d "." -f 1,2)
export PY_PYTHON=$(pyenv exec python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
```

Or this line in your `~/.config/fish/config.fish` file:
Or this line to your `~/.config/fish/config.fish` file:

```sh
set -gx PY_PYTHON (head -n 1 (pyenv root)/version | cut -d "." -f 1,2)
set -gx PY_PYTHON (pyenv exec python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
```

## Appendix
Expand Down
41 changes: 41 additions & 0 deletions changelog.d/20210910_1523_cas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Removed

- A bullet item for the Removed category.

-->
<!--
### Added

- A bullet item for the Added category.

-->

### Changed

- Updated the FAQ entry for pyenv to rely on the global version of Python installed.

<!--
### Deprecated

- A bullet item for the Deprecated category.

-->
<!--
### Fixed

- A bullet item for the Fixed category.

-->
<!--
### Security

- A bullet item for the Security category.

-->
13 changes: 6 additions & 7 deletions docs/readme/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,19 @@ but [U+2502/"Box Drawings Light Vertical"](https://www.compart.com/en/unicode/U+
### How can I make the Python Launcher use my default Python version from pyenv?

If you're using [pyenv](https://github.com/pyenv/pyenv) to manage your Python
versions, you'll want to grab the major and minor version from the first Python
version listed in your default
[pyenv version file](https://github.com/pyenv/pyenv#choosing-the-python-version).
versions, you'll want to set the version the Launcher uses to the pyenv
[global version](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global).

You can add this line to your `.zshrc` or `bashrc` file:
Add this line to your `.zshrc` or `.bashrc` file:

```sh
export PY_PYTHON=$(head -n 1 $(pyenv root)/version | cut -d "." -f 1,2)
export PY_PYTHON=$(pyenv exec python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
```

Or this line in your `~/.config/fish/config.fish` file:
Or this line to your `~/.config/fish/config.fish` file:

```sh
set -gx PY_PYTHON (head -n 1 (pyenv root)/version | cut -d "." -f 1,2)
set -gx PY_PYTHON (pyenv exec python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
```

## Appendix
Expand Down