
    si0                         S r SSKJrJrJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SSKJr  S	\S
\4S jr\S\S\S
\4S j5       rg)zhCLI implementation for `conda-env create`.

Creates new conda environments with the specified packages.
    )ArgumentParser	Namespace_SubParsersAction)Path   )
CondaError)set_keys)DEFAULT_CONDARC_FILENAME)noticessub_parsersreturnc                 D   SSK Jn  SSKJnJnJn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S9  U" U5        U" U5        U" U5        U" U5        U" U5        U	" U5        U" U5        UR                  SS9  U$ )Nr   dals   )add_output_and_prompt_optionsadd_parser_default_packages add_parser_environment_specifieradd_parser_networkingadd_parser_platformadd_parser_prefixadd_parser_solverz>Create an environment based on an environment definition file.z	
        a!  

        If using an environment.yml file (the default), you can name the
        environment in the first line of the file with 'name: envname' or
        you can specify the environment name in the CLI command using the
        -n/--name argument. The name specified in the CLI will override
        the name specified in the environment.yml file.

        Unless you are in the directory containing the environment definition
        file, use -f to specify the file path of the environment definition
        file you want to use.

        a]  
        Examples::

            conda env create
            conda env create -n envname
            conda env create folder/envname
            conda env create -f /path/to/environment.yml
            conda env create -f /path/to/requirements.txt -n envname
            conda env create -f /path/to/requirements.txt -p /home/user/envname

        )helpdescriptionepilogz-fz--filestorez6Environment definition file (default: environment.yml)zenvironment.yml)actionr   defaultz!conda.cli.main_env_create.execute)func)create)
auxlib.ishr   helpersr   r   r   r   r   r   r   
add_parseradd_argumentset_defaults)r   kwargsr   r   r   r   r   r   r   r   summaryr   r   ps                 9lib/python3.13/site-packages/conda/cli/main_env_create.pyconfigure_parserr*      s    !   OG			 		K  
	F 				
 	A NNE!   a ! %Q'"!!$aNN;N<H    argsparserc                    SSK Jn  SSKJnJ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
  SS	KJn  S
SKJn  U" U R(                  5        UR*                  R-                  U R(                  UR.                  S9nUR1                  U R(                  5      nUR2                  nU R4                  c;  U R6                  c.  UR6                  c  U" S5      nU	" U5      eUR6                  U l        U" X05      nU" U5      nU R8                  (       a2  UR;                  5       (       d  UR=                  5       (       a  U" U5        UR?                  5         URA                  5         S S S.nU RB                  (       d  URD                  O/ nU RF                  (       a  SnU" U5      n/ URH                  QUQnURG                  UX5      nU R                  (       a)  [K        URM                  URO                  5       5      5        g[K        URQ                  5       SS9   gU(       a   SnU" U5      nURS                  UUX5      UU'   SnU" U5      nURS                  UURH                  X5      UU'   URT                  RW                  5        H%  u  nn U" U5      nURS                  UUX5      UU'   M'     URZ                  UR]                  5       :w  a$  [_        SURZ                  4[a        U[b        5      S9  URd                  (       a  URg                  URd                  5        URi                  5         U" U UU5        g! U
 a    [Y        U" SU SU S35      5      ef = f)Nr   r   )contextdetermine_target_prefix)json)
PrefixData)print_result)get_installer)CondaEnvExceptionInvalidInstaller)rm_rfr   )validate_file_exists)sourcenamea  
                Unable to create environment
                Please re-run this command with one of the following options:
                * Provide an environment name via --name or -n
                * Provide a path on disk via --prefix or -p
                )condapipr;    )endz7
                        Unable to install package for z.

                        Please double check and ensure your dependencies file has
                        the correct spelling. You might also try installing the
                        conda-env-zd package to see if provides
                        the required installer.
                        subdir)pathr   )5r!   r   base.contextr/   r0   common.serializer1   core.prefix_datar2   env.envr3   env.installers.baser4   
exceptionsr5   r6   gateways.disk.deleter7   commonr8   fileplugin_managerget_environment_specifierenvironment_specifierenvironment_specenvprefixr:   yesis_baseexistsvalidate_pathvalidate_nameno_default_packagescreate_default_packagesdry_runrequested_packagesprintdumpsto_dictto_yamlinstallexternal_packagesitemsr   r?   _native_subdirr	   r   r
   	variablesset_environment_env_varsset_nonadmin)r,   r-   r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   	spec_hookspecrN   msgrO   prefix_dataresultargs_packagesinstaller_type	installer	pkg_specs
solved_envs                            r)   executern   b   s   !?'-&3@,, # &&@@yy** A I %%dii0D
((C {{tyy088C $C((HH	$W3FV$Kxx++--+2D2D2F2Ff D)F 04/G/G''R  || !.1	=c,,=}=	&&y$<
99$**Z//123` ] *$$&B/\ W $N%n5I%.%6%6v}d%XF>" !!.1	!*!2!2C**D"
~
 *-)>)>)D)D)F%NI).9	)2):):69d)X~& *G$ >>W33557>>*&":;
 ==00?  "T66*5 $  77E6F G# $2"2 3	 s   L//MN)__doc__argparser   r   r   pathlibr   r=   r   cli.main_configr	   common.configurationr
   r   r*   intrn    r+   r)   <module>rv      sk   
 
   & ; J"3 J. JZ 	p) p^ p p 	pr+   