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

Include a fix for pyenv with poetry shell in documentation #678

Closed
Closed
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
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ fpath+=~/.zfunc
```


## Using `poetry shell` or `poetry run` alongside `pyenv`

The commonly used python version management tool [pyenv](https://github.com/pyenv/pyenv) includes, by design,
a layer of 'shims' that allow the same commands to route to different executables
based on configuration variables. To avoid interference between the two systems,
you should wrap your pyenv initialization in a check for the POETRY_ACTIVE environment variable:

```bash
# Fish
if not set -q POETRY_ACTIVE
set -x PATH $PYENV_ROOT/bin $PATH
status --is-interactive; and source (pyenv init -|psub)
status --is-interactive; and source (pyenv virtualenv-init -|psub)
end
```


## Introduction

`poetry` is a tool to handle dependency installation as well as building and packaging of Python packages.
Expand Down