How do I remove/delete a virtualenv?

前端 未结 16 987
感动是毒
感动是毒 2020-11-29 14:25

I created an environment with the following command: virtualenv venv --distribute

I cannot remove it with the following command: rmvirtualenv venv

相关标签:
16条回答
  • 2020-11-29 15:01

    Use rmvirtualenv

    Remove an environment, in the $WORKON_HOME.

    Syntax:

    rmvirtualenv ENVNAME
    

    You must use deactivate before removing the current environment.

    $ rmvirtualenv my_env
    

    Reference: http://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html

    0 讨论(0)
  • 2020-11-29 15:03

    The following command works for me.

    rm -rf /path/to/virtualenv
    
    0 讨论(0)
  • 2020-11-29 15:04

    if you are windows user, then it's in C:\Users\your_user_name\Envs. You can delete it from there.

    Also try in command prompt rmvirtualenv environment name.

    I tried with command prompt so it said deleted but it was still existed. So i manually delete it.

    0 讨论(0)
  • 2020-11-29 15:05

    deactivate is the command you are looking for. Like what has already been said, there is no command for deleting your virtual environment. Simply deactivate it!

    0 讨论(0)
  • 2020-11-29 15:06

    If you are using pyenv, it is possible to delete your virtual environment:

    $ pyenv virtualenv-delete <name>
    
    0 讨论(0)
  • 2020-11-29 15:08

    I used pyenv uninstall my_virt_env_name to delete the virual environment.

    Note: I'm using pyenv-virtualenv installed through the install script.

    0 讨论(0)
提交回复
热议问题