dephell venv create¶
Create virtual environment for current project and environment. Always create virtual environment before executing dephell deps install or dephell package install if you want them to install packages into special virtual environment. Otherwise, these commands will use your current virtual environment (or global interpreter).
Path to virtual environment contains these substitutions:
{project}
will be replaced by the project name (name of path fromproject
option, this is name of the current directory by default).{digest}
will be replaced by the short 4-letters digest of the project path to avoid conflicts for the projects with the same name in different locations.{env}
will be replaced by current environment (main
by default).
So, virtual environment unique for every project and environment by default.
For example, create virtual environment for docs
environment of current project:
$ dephell venv create --env=docs
Get venv path template with dephell inspect config command:
$ dephell inspect config --filter=venv
/home/gram/.local/share/dephell/venvs/{project}-{digest}/{env}
Get path to the current venv (if created) with dephell inspect venv command:
$ dephell inspect venv venv
/home/gram/.local/share/dephell/venvs/dephell-nLn6/main
See also¶
- How DepHell choose Python interpreter.
- dephell deps install to install project dependencies into created virtual environment.
- dephell package install to install package into created virtual environment.
- dephell jail install to install Python CLI tools into isolated virtual environment.
- dephell venv destroy to remove virtual environment.
- dephell venv run to run tool from virtual environment.
- dephell venv shell to activate virtual environment for current shell.