
    <Bh)                     ~    S r SSKrSSKJrJrJr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.
    N)ArgumentParser	Namespace_StoreAction_SubParsersAction   )
CondaError)
deprecated)noticessub_parsersreturnc                    SSK Jn  SSKJn  SSK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R                  SS[        R                  " SS[        SS9USS9  U" U5        U" U5        U	" U5        U" U5        UR!                  SS9  U$ )Nr   dals)NULL   )add_output_and_prompt_optionsadd_parser_default_packages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   defaultremote_definitionz0Remote environment definition / IPython notebookz24.7z25.9z*Use `conda env create --file=URL` instead.)addendum?)r   r   r   nargsz!conda.cli.main_env_create.execute)func)create)
auxlib.ishr   common.constantsr   helpersr   r   r   r   r   r   
add_parseradd_argumentr	   r   r   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 !NN?  A	
     "!!$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" U R(                  S9nUR*                  nU R,                  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 R0                  (       a2  UR3                  5       (       d  UR5                  5       (       a  U" U5        UR7                  5         UR9                  5         S S S.nU R:                  (       d  UR<                  O/ nU R>                  (       a  SnU" U5      nUR@                  RC                  U/ 5      nURE                  U5        UR?                  UX5      nU RF                  (       a-  [I        [F        RJ                  " URM                  5       SS95        g[I        URO                  5       SS9   gU(       a   SnU" U5      nURQ                  UUX5      UU'   [S        UR@                  RU                  5       5      S:X  a#  Sn/ nU" U5      nURQ                  UUX5      UU'   OCUR@                  RU                  5        H%  u  nn U" U5      nURQ                  UUX5      UU'   M'     URX                  (       a  UR[                  URX                  5        UR]                  5         U" U UU5        g! U
 a    [W        U" SU SU S35      5      ef = f)Nr   r   )contextdetermine_target_prefix)
PrefixData)print_result)get_installer)detect)CondaEnvExceptionInvalidInstaller)rm_rfr   )validate_file_exists)filenamea  
                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>   )indent )endr   z;
                            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-zl package to see if provides
                            the required installer.
                            )/r$   r   base.contextr3   r4   core.prefix_datar5   env.envr6   env.installers.baser7   	env.specsr8   
exceptionsr9   r:   gateways.disk.deleter;   commonr<   fileenvironmentprefixnameyesis_baseexistsvalidate_pathvalidate_nameno_default_packagescreate_default_packagesdry_rundependenciesgetextendjsonprintdumpsto_dictto_yamlinstalllenitemsr   	variablesset_environment_env_varsset_nonadmin)r0   r1   r   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   specenvmsgrM   prefix_dataresultargs_packagesinstaller_type	installer	pkg_specs
solved_envs                           r-   executero   k   s   !?-&3"@,, # 499%D


C {{tyy088C $C((HH	$W3FV$Kxx++--+2D2D2F2Ff D)F 04/G/G''R  || !.1	$$((<	'&&y$<
99$**Z//1!<=T Q *$$&B/P K $N%n5I%.%6%6v}d%XF>"s%%'(A-$NI%n5I%.%6%6vy$%TF>"-0-=-=-C-C-E)	 -n =I-6->->	4.F>* .F( ==00?  "T66*) ( $!;;I:J K' (6&6 7 	 s   K55L)__doc__rZ   argparser   r   r   r   rA   r   deprecationsr	   r
   r.   intro    r/   r-   <module>ru      sj   
    % S"3 S. Sl 	g) g^ g g 	gr/   