Skip to content

Issue with pyenv shell initialization as documented in blog post #307

@jdeaton

Description

@jdeaton

While reviewing Part 1 of the corresponding blog series it appears that one of the shell commands needs updated for more recent versions of pyenv. After running the following shell commands and later doing pyenv local <version #>, I found that things were not working as expected where python was mapped to the appropriate local versions. This was all done on macOS with Homebrew installed pyenv/poetry.

export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

After browsing around I found several posts that suggested that the eval "$(pyenv init -)" needed to be changed to eval "$(pyenv init --path)" for more recent pyenv than was available when the posts were done. After doing this things seemed to work as advertised.

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions