---
name: "cdist-type__pyvenv"
section: "7"
platform: "linux"
package: "cdist"
version: "7.0.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cdist-type__pyvenv"
---

# cdist-type\_\_pyvenv(7)

Create or remove python virtual environment

## NAME

cdist-type\_\_pyvenv - Create or remove python virtual environment

## DESCRIPTION

This cdist type allows you to create or remove python virtual environment using pyvenv on python3 -m venv. It assumes pyvenv is already installed. Concrete package depends on concrete OS and/or OS version/distribution. Ensure this for e.g. in your init manifest as in the following example:

## REQUIRED PARAMETERS

None

## OPTIONAL PARAMETERS

- **state**

  Either "present" or "absent", defaults to "present"

- **group**

  Group to chgrp to

- **mode**

  Unix permissions, suitable for chmod

- **owner**

  User to chown to

- **pyvenv**

  Use this specific pyvenv

- **venvparams**

  Specific parameters to pass to pyvenv invocation

## EXAMPLES

```
__pyvenv /home/services/djangoenv
# Use specific pyvenv
__pyvenv /home/foo/fooenv --pyvenv /usr/local/bin/pyvenv-3.4
# Create python virtualenv for user foo.
__pyvenv /home/foo/fooenv --group foo --owner foo
# Create python virtualenv with specific parameters.
__pyvenv /home/services/djangoenv --venvparams "--copies --system-site-packages"
```

## AUTHORS

Darko Poljak \<*darko.poljak--@--gmail.com*\>

## COPYING

Copyright (C) 2016 Darko Poljak. Free use of this software is granted under the terms of the GNU General Public License v3 or later (GPLv3+).

## COPYRIGHT

ungleich GmbH 2021
