Skip to content

Virtualenv created with pyenv-virtualenv not fully uninstalled #436

@bcvanmeurs

Description

@bcvanmeurs

Too many issues will kill our team's development velocity, drastically.
Make sure you have checked all steps below.

Prerequisite

  • Make sure your problem is not listed in the common build problems.
  • Make sure no duplicated issue has already been reported in the pyenv issues. You should look for closed issues, too.
  • Make sure you are not asking us to help solving your specific issue.
    • GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
  • Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • Make sure your problem is not derived from plugins.
    • This repository is maintaining pyenv and the default python-build plugin only. Please refrain from reporting issues of other plugins here.

Description

  • Platform information (e.g. Ubuntu Linux 16.04): macOS 12.5.1
  • OS architecture (e.g. amd64): x86_64
  • pyenv version: 2.3.4
  • Python version: 3.9.7
  • C Compiler information (e.g. gcc 7.3):
  • Please attach the debug trace of the failing command as a gist:

Pyenv seems not to uninstall everything correctly:

❯ pyenv virtualenv 3.9.7 test
❯ pyenv versions
* system (set by /Users/bram/.pyenv/version)
  3.9.7
  3.10.5
  3.9.7/envs/test
  3.10.5/envs/global
* global (set by /Users/bram/.pyenv/version)
  test
❯ pyenv uninstall test
pyenv: remove /Users/bram/.pyenv/versions/test? [y|N] y
pyenv: test uninstalled
❯ pyenv versions
* system (set by /Users/bram/.pyenv/version)
  3.9.7
  3.10.5
  3.9.7/envs/test
  3.10.5/envs/global
* global (set by /Users/bram/.pyenv/version)

In this example the environment test is gone but 3.9.7/envs/test is still there.
But this doesn't work:

❯ pyenv uninstall 3.9.7/envs/test
pyenv: version `test' not installed

test env is gone here:

❯ ls ~/.pyenv/versions
3.10.5                 3.9.7                                global

test env remains here:

❯ ls ~/.pyenv/versions/3.9.7/envs
test

manually removing ~/.pyenv/versions/3.9.7/envs/test is a workaround

Could this be related to pyenv/pyenv#2432 in 2.3.4?

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