How to use 'delete virtualenv' in Python

Every line of 'delete virtualenv' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
97def remove_virtualenv(cwd, venv_path):
98 subprocess.check_call(["rm", "-rf", venv_path], cwd=cwd)
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

72def do(self):
73 for dirname in ['bin', 'include', 'lib', 'src', 'build']:
74 self.conf.dirname = dirname
75 sudo('rm --recursive --force %(env_path)s/%(dirname)s' % self.conf)

Related snippets