1HATCH-ENV(1)                     User Commands                    HATCH-ENV(1)
2
3
4

NAME

6       hatch env – Manages virtual environments
7

SYNOPSIS

9       hatch env [OPTIONS] NAME
10

DESCRIPTION

12       Creates  a  new  virtual  env  that  can  later  be  utilized  with the
13       hatch-shell(1) command.
14

OPTIONS

16       -py, --python TEXT
17              The named Python path to use.  This overrides --pypath.
18
19       -pp, --pypath TEXT
20              An absolute path to a Python executable.
21
22       -g, --global-packages
23              Gives the virtual environment access to  the  global  site-pack‐
24              ages.
25
26       -c, --clone
27              Specifies an existing virtual env to clone.  (Experimental)
28
29       -v, --verbose
30              Increases verbosity.
31
32       -r, --restore
33              Attempts  to make all virtual envs in /builddir/.virtualenvs us‐
34              able by fixing the executable paths in scripts and removing  all
35              compiled *.pyc files.  (Experimental)
36
37       -l, --list
38              Shows  available  virtual envs.  Can stack up to 3 times to show
39              more info.
40
41       -h, --help
42              Show a help message and exit.
43

EXAMPLES

45              $ hatch pypath -l
46              py2 -> /usr/bin/python
47              py3 -> /usr/bin/python3
48              $ hatch env -l
49              No virtual environments found in /home/ofek/.virtualenvs. To create one do `hatch env NAME`.
50              $ hatch env my-app
51              Already using interpreter /usr/bin/python3
52              Successfully saved virtual env `my-app` to `/home/ofek/.virtualenvs/my-app`.
53              $ hatch env -py py2 old
54              Successfully saved virtual env `old` to `/home/ofek/.virtualenvs/old`.
55              $ hatch env -pp ~/pypy3/bin/pypy fast
56              Successfully saved virtual env `fast` to `/home/ofek/.virtualenvs/fast`.
57              $ hatch env -ll
58              Virtual environments found in /home/ofek/.virtualenvs:
59
60              fast ->
61                Version: 3.5.3
62                Implementation: PyPy
63              my-app ->
64                Version: 3.5.2
65                Implementation: CPython
66              old ->
67                Version: 2.7.12
68                Implementation: CPython
69

SEE ALSO

71       hatch(1)
72
73       hatch-build(1),   hatch-clean(1),   hatch-conda(1),    hatch-config(1),
74       hatch-grow(1), hatch-init(1), hatch-install(1), hatch-new(1), hatch-py‐
75       path(1),     hatch-python(1),     hatch-release(1),      hatch-shed(1),
76       hatch-shell(1), hatch-test(1), hatch-uninstall(1), hatch-update(1)
77
78
79
80                                 Feburary 2022                    HATCH-ENV(1)
Impressum