Skip to content

Calling rehash is required after installing new python version #805

Description

@dangitall

I'm running on OS X and am observing that calling rehash is required 100% of the time after a new version of Python is installed with pyenv. My impression is that shouldn't be needed. Is this expected behavior?

$ python -V
Python 2.7.13
$ pyenv install 3.6.0
Installing Python-3.6.0...
Installed Python-3.6.0 to /Users/dan/.pyenv/versions/3.6.0

$ pyenv global 3.6.0
$ python -V
Python 2.7.13
$ pyenv rehash
$ python -V
Python 3.6.0

I see a similar issue after uninstalling a version. This is run immediately after the above commands:

$ pyenv uninstall 3.6.0
pyenv: remove /Users/dan/.pyenv/versions/3.6.0? y
$ python -V
bash: /Users/dan/.pyenv/shims/python: No such file or directory
$ pyenv versions
pyenv: version `3.6.0' is not installed (set by /Users/dan/.pyenv/version)
  system
$ pyenv rehash
$ python -V
Python 2.7.13

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions