Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deactivate pyenv in current shell

Tags:

My .bashrc has this:

enable-pyenv () {     # Load pyenv automatically by adding     # the following to your profile:      export PATH="$HOME/.pyenv/bin:$PATH"     eval "$(pyenv init -)"     eval "$(pyenv virtualenv-init -)" }  enable-pyenv 

Which enables pyenv. In some situations, I want to (temporarily) disable pyenv. How can I do this?

like image 857
blueFast Avatar asked Sep 06 '16 12:09

blueFast


People also ask

How do you delete a virtual environment in Pyenv?

If eval "$(pyenv virtualenv-init -)" is configured in your shell, pyenv-virtualenv will automatically activate/deactivate virtualenvs on entering/leaving directories which contain a .

What is Pyenv shell?

Meet pyenv: a Simple Python Version Management tool. Previously known as Pythonbrew, pyenv lets you change the global Python version, install multiple Python versions, set directory (project)-specific Python versions, and yes create/manage virtual python environments ("virualenv's").

What does Pyenv activate do?

This command activates the version specified by setting the PYENV_VERSION environment variable. This command overwrites any applications or global settings you may have. If you want to deactivate the version, you can use the --unset flag.


2 Answers

If you want to use the python version from your system:

pyenv local system 

https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-local

like image 160
pylanglois Avatar answered Sep 25 '22 17:09

pylanglois


To deactivate from current shell environment, try
pyenv shell --unset

like image 36
aakinlalu Avatar answered Sep 24 '22 17:09

aakinlalu