
    \Zi                         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	  SS	KJn
Jn  SS
KJn  SSKJn  U" U R,                  5        UR.                  R1                  U R,                  UR2                  S9nUR5                  U R,                  5      nUR6                  nU R8                  c;  U R:                  c.  UR:                  c  U" S5      nU
" U5      eUR:                  U l        U" X05      nU" U5      nU R<                  (       a2  UR?                  5       (       d  URA                  5       (       a  U" U5        URC                  5         URE                  5         S S S.nU RF                  (       d  URH                  O/ nU RJ                  (       a  SnU" U5      n/ URL                  QUQnURK                  UU U5      nU R                  (       a)  [O        URQ                  URS                  5       5      5        g[O        URU                  5       SS9   gU(       a!  SnU" U5      nURW                  UUU U5      UU'   SnU" U5      nURW                  UURL                  U U5      UU'   URX                  R[                  5        HV  u  nn U" U5      nUS:X  a*  U	" U R,                  5      nURW                  UUU UUS9UU'   M?  URW                  UUU U5      UU'   MX     UR^                  URa                  5       :w  a$  [c        SUR^                  4[e        U[f        5      S9  URh                  (       a  URk                  URh                  5        URm                  5         U" U UU5        g! U a    []        U" SU SU S35      5      ef = f)Nr   r   )contextdetermine_target_prefix)json)
PrefixData)print_result)get_installer)get_pip_workdir)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<    )endr=   )workdirz7
                        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   )7r!   r   base.contextr/   r0   common.serializer1   core.prefix_datar2   env.envr3   env.installers.baser4   env.pip_utilr5   
exceptionsr6   r7   gateways.disk.deleter8   commonr9   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   rA   _native_subdirr	   r   r
   	variablesset_environment_env_varsset_nonadmin)r,   r-   r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   	spec_hookspecrQ   msgrR   prefix_dataresultargs_packagesinstaller_type	installer	pkg_specs
solved_envr@   s                              r)   executerq   b   sg   !?'-&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3p m *$$&B/l g $N%n5I%.%6%6v}dTW%XF>" !!.1	!*!2!2C**D#"
~
 *-)>)>)D)D)F%NI).9	!U*-dii8G-6->->	4g .? .F>* .7->->	4.F>* *G4 >>W33557>>*&":;
 ==00?  "T66*5 $  77E6F G# $2"2 3	 s   6M)M))NN)__doc__argparser   r   r   pathlibr   r>   r   cli.main_configr	   common.configurationr
   r   r*   intrq    r+   r)   <module>ry      sk   
 
   & ; J"3 J. JZ 	y) y^ y y 	yr+   