
    si                        S r SSKJr  SSKJr  SSKJr  SSKJr  \(       a
  SSKJ	r	J
r
Jr  \" \5      rSS jr\SS	 j5       rg
)zdCLI implementation for `conda create`.

Creates new conda environments with the specified packages.
    )annotations)	getLogger)TYPE_CHECKING   )notices)ArgumentParser	Namespace_SubParsersActionc                J   SSK Jn  SSKJn  SSKJn  SSKJnJnJ	nJ
n  Sn	U" SU	 S	35      n
U" S
5      nU R                  "  SU	U
US.UD6nUR                  SSSSS9  U" U5      u  pnU" U5        U" U5        U" U5        UR                  SUSSUS9  UR                  SS9  U$ )Nr   )dals)NULL   )NullCountAction) add_parser_create_install_updateadd_parser_default_packagesadd_parser_platformadd_parser_solverzBCreate a new conda environment from a list of specified packages. z	
        z

        To use the newly-created environment, use 'conda activate envname'.
        This command requires either the -n NAME or -p PREFIX option unless
        --dry-run or --download-only is specified.
        a  
        Examples:

        Create an environment containing the package 'sqlite'::

            conda create -n myenv sqlite

        Create an environment (env2) as a clone of an existing environment (env1)::

            conda create -n env2 --clone path/to/file/env1

        )helpdescriptionepilogz--clonestorezDCreate a new environment as a copy of an existing local environment.ENV)actionr   metavarz--devzUse `sys.executable -m conda` in wrapper scripts instead of CONDA_EXE. This is mainly for use during tests where we test new conda sources against old Python versions.dev)r   r   destdefaultzconda.cli.main_create.execute)func)create)
auxlib.ishr   common.constantsr   actionsr   helpersr   r   r   r   
add_parseradd_argumentset_defaults)sub_parserskwargsr   r   r   r   r   r   r   summaryr   r   psolver_mode_options_channel_optionss                   5lib/python3.13/site-packages/conda/cli/main_create.pyconfigure_parserr/      s    !'(  SG			 		K 	F 				
 	A NNS	   /Oq.Q+O 34()*NN'    NN7N8H    c                   SS K nSSKJn  SSKJn  SSKJn  SSKJn  SSK	J
nJnJn	  SSKJn
  SS	KJn  S
SKJnJnJn  S
SKJnJn  U R.                  (       dq  U R0                  (       d`  UR2                  (       d  UR4                  (       a6  UR6                  R9                  U" 5       U5      U l        UR;                  U S9  OU" S5      eU R<                  (       a  U R>                  (       a1  U	" S[A        U R>                  5      [C        U R>                  5      S5      eU RD                  (       a1  U	" S[A        U RD                  5      [C        U RD                  5      S5      eURG                  SS9nURI                  5       (       ab  UR2                  (       a  U" S5      eU" SURJ                   S3SSS9  [L        RO                  SURJ                  5        U
" URJ                  5        O+URQ                  5       (       a  U" SURJ                   S3SSS9  U" 5         U" U RD                  5        U R<                  (       a	  U" X5        O	U" XS5        URS                  5         U" U R.                  =(       d    URJ                  5        g)Nr   )mktempr   )UNUSED_ENV_NAME)context)
PrefixData)ArgumentErrorCondaValueErrorTooManyArgumentsError)rm_rf)
confirm_ynr   )print_activate&validate_environment_files_consistencyvalidate_subdir_config)installinstall_clone)argparse_argsz6one of the arguments -n/--name -p/--prefix is requiredz;Did not expect any new packages or arguments for `--clone`.z8`--file` and `--clone` arguments are mutually exclusive.T)validatez<Cannot `create --dry-run` with an existing conda environmentz0WARNING: A conda environment already exists at 'z'

Remove existing environment?
This will remove ALL directories contained within this specified prefix directory, including any other conda environments.

noF)r   dry_runz Removing existing environment %sz<WARNING: A directory already exists at the target location 'zB'
but it is not a conda environment.
Continue creating environmentr   )*ostempfiler2   base.constantsr3   base.contextr4   core.prefix_datar5   
exceptionsr6   r7   r8   gateways.disk.deleter9   	reportersr:   commonr;   r<   r=   r>   r?   nameprefixrC   download_onlypathjoin__init__clonepackageslenlistfilefrom_contextis_environmenttarget_prefixloginfoexistsset_nonadmin)argsparserrD   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   prefix_datas                     r.   executerb   W   s   0&-RR,& 
 0 99T[[??g33'',,vxADK40H  zz=='DMM"T]]#M	  YY'DIITYYJ	  ))4)8K!!##?? "N  	>w?T?T>U V[ [ 	
 	3W5J5JKg##$					J7K`K`Ja b, , 	
  +4995 zzd#h'4995 5 56r0   N)r'   r
   returnr   )r_   r	   r`   r   rc   int)__doc__
__future__r   loggingr   typingr   r   argparser   r	   r
   __name__r[   r/   rb    r0   r.   <module>rl      sG   
 #    EE?D 	X 	Xr0   