Pyenv-virtualenv: I can not uninstall virtual environment.

Created on 24 Oct 2017  ·  5Comments  ·  Source: pyenv/pyenv-virtualenv

System: MacOS
When I use pyenv uninstall venv_test, it doesn't work and the virtual environment "venv_test" is still existed.

Most helpful comment

pyenv uninstall venv_test
It does work, when you input y after this.
pyenv-virtualenv: remove /Users/t/.pyenv/versions/3.7.1/envs/hello_world?

Use pyenv virtualenvs to check.

All 5 comments

That's not what uninstall does. You're using the wrong command.

@jimmywan I'm new to pyenv, can you tell me what is the right command? Thank U very much!

Start with pyenv help

From the README on this repo:

Delete existing virtualenv
Removing the directories in $(pyenv root)/versions and $(pyenv root)/versions/{version}/envs will > delete the virtualenv, or you can run:

pyenv uninstall my-virtual-env

This does not result in removal of a given virtual env, at least when run as part of a non-interactive script.

However, pyenv commands does list out some commands, including virtualenv-delete. Presumably that is what should be used.

The documentation should probably be updated.

Also, note that if you're trying to run the command in a script, it has to include the -f flag.

pyenv uninstall venv_test
It does work, when you input y after this.
pyenv-virtualenv: remove /Users/t/.pyenv/versions/3.7.1/envs/hello_world?

Use pyenv virtualenvs to check.

Was this page helpful?
0 / 5 - 0 ratings