I found the following command online:
conda create -n tensorflow_env tensorflow
What does the "-n" mean in this command?
I found the following command online:
conda create -n tensorflow_env tensorflow
What does the "-n" mean in this command?
From the documentation:
usage: conda create [-h] [--clone ENV] [-n ENVIRONMENT | -p PATH] [-c CHANNEL] [--use-local] [--override-channels] [--strict-channel-priority] [--no-channel-priority] [--no-deps | --only-deps] [--no-pin] [--copy] [-C] [-k] [--offline] [-d] [--json] [-q] [-v] [-y] [--download-only] [--show-channel-urls] [--file FILE] [--no-default-packages] [package_spec [package_spec ...]]
...
-n, --name Name of environment.
Every Linux command has a different set of arguments or flags - it's entirely up to the program. Some programs uses short flags like -n
, some use long flags like --thingy
, some use both, and some don't use "flags" at all like dd if=foo of=bar
.
A common convention is for programs to list out their options when passed --help
or -h
, and many programs provide a Manual Page (manpage) which you can read using man name_of_command
, although it looks like conda
may not have one.
getopt
in C, argparse
in Python) and automatically generating help text or man pages.
– Kristopher Ives
Jan 27 '19 at 13:17
conda
uses Python's argparse
to generate that --help
text.
– Kristopher Ives
Jan 27 '19 at 13:17
conda create --help
yet? – PerlDuck Jan 27 '19 at 12:23-n
appears to be the short-form of--name
. See for example Creating an environment with commands – steeldriver Jan 27 '19 at 12:25