I iw<ddlmZddlZddlZddlZddlZddlZddlZddlm Z m Z ddl m Z ddl mZddlmZddlmZddlZddlmZdd lmZdd lmZdd lmZmZdd lmZm Z dd l!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9ddl:m;Z;mZ>m?Z?m@Z@ddlAmBZBddlCmDZDmEZEddlFmGZGe9eHZIGddeZJ d" d#dZKd$dZL d% d&d ZM d'd!ZNy)() annotationsN) SUPPRESS_HELPValues)Path)canonicalize_name)InvalidProxyURL) print_json) WheelCache) cmdoptions)make_target_python)RequirementCommand with_cleanup)ERRORSUCCESS) CommandErrorInstallationErrorInstallWheelBuildError) get_scheme)get_environment)InstallationReport)get_build_tracker)ConflictDetailscheck_install_conflicts)install_given_reqs)InstallRequirement)WINDOWStest_writable_dir) getLogger)check_externally_managed ensure_dirget_pip_version(protect_pip_from_modification_on_windowswarn_if_run_as_root write_output) TempDirectory)running_under_virtualenvvirtualenv_no_global)buildcjeZdZdZdZd dZed dZ d dZ d dZ d dZ y)InstallCommandaI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. a% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...c |jjtj|jjtj|jjtj |jjtj |jjtj|jjtj|jjddddd|jjddd d dd tj|j|jjd ddd|jjdddt|jjddd dd |jjddd dd |jjtj|jjddddd|jjddddd gd!"|jjd#d$dd%|jjd&d'd(dd)|jjtj|jjtj|jjtj|jjtj|jjtj |jjtj"|jjd*dd+d,d-|jjd.dd+d/0|jjd1dd2d,d3|jjd4dd5d,d6|jjtj$|jjtj&|jjtj(|jjtj*|jjtj,|jjtj.tj0tj2|j4}|j4j7d7||j4j7d7|j|jjd8d9d:dd; y). By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)r0metavarr1r2z--user use_user_sitezInstall to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r0r/r2z --no-user store_falsez--root root_pathz=Install everything relative to this alternate root directory.z--prefix prefix_patha[Installation prefix where lib, bin and other top-level folders are placed. Note that the resulting installation may contain scripts and other resources which reference the Python interpreter of pip, and not that of ``--prefix``. See also the ``--python`` option if the intention is to install packages into another (possibly pip-free) environment.z-Uz --upgradeupgradezUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategyupgrade_strategyzonly-if-neededeageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r0r1choicesr2z--force-reinstallforce_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedignore_installedzIgnore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z --compilecompileTz'Compile Python source files to bytecodez --no-compilez.Do not compile Python source files to bytecode)r/r0r2z--no-warn-script-locationwarn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflictswarn_about_conflictsz%Do not warn about broken dependenciesrz--reportjson_report_filefileaWGenerate a JSON file describing what pip did to install the provided requirements. Can be used in combination with --dry-run and --ignore-installed to 'resolve' the requirements. When - is used as file name it writes to stdout. When writing to stdout, please combine with the --quiet option to avoid mixing pip logging output with JSON output.)cmd_opts add_optionr requirements constraintsbuild_constraintsno_depspreeditableadd_target_python_optionsrsrcignore_requires_pythonno_build_isolation use_pep517check_build_depsoverride_externally_managedconfig_settings no_binary only_binary prefer_binaryrequire_hashes progress_barroot_user_actionmake_option_group index_groupparserinsert_option_group)self index_optss d/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pip/_internal/commands/install.py add_optionszInstallCommand.add_optionsVs   !8!8!:;   !7!7!9:   !=!=!?@   !3!3!56   !12   !4!4!67   1 !     % !  ,,T]];    % !       !   P !     !   !12    ) !    #$%w/G !   "N !     #4 !    !B!B!DE   !>!>!@A   !6!6!89   !?   !G!G!IJ   !;!;!=>   : !     A !    ' 'C !    ! '8 !    !5!5!78   !7!7!9:   !9!9!;<   !:!:!<=   !8!8!:;   !?11  " " KK '':6 ''4==9   #G ! c |jr|j td|jxr |j xr.|j duxr|jduxr|j du}|r|js td}|jr |j}tj|tj|dtjdt!t#|j|j |j|j |j$|_d}d}|jrd|_t(j*j-|j|_t(j*j/|jr4t(j*j1|js tdt3d }|j*}|j5||j7|}t9|}|j;||||j< } |j5t?} t3|j@ d d } |jC||| |} tE|jF} | D] }d|_$ |jK| || || |j|jL }|jO|| || |j|j&|j<|jP||jR }|jU| |jW| |j }|jrtY|jZ}|jdk(rt]|j_nHta|jdd5}tcjd|j_|ddddd|jrFtgd|jZD}|r"tiddjkd|DtlS|jo|jpjs |jud}|jvdu}t{||jZDcgc]}|j|r|}}t|| d\}}|r t||j|}d}|j xr |j}|r|j|}|j}|js |j rd}t||j ||j ||j|j|j}t|j||j |j |j$ } t| }!|jtjd!"g}"i}#|!jD]}$|$j|#|$j<|D]F}%|%j}&|#jt|&d}'|'r|&d|'}(n|&}(|"j|(H|"|j||j|#djk|"})|)r tid$|)|jr+|sJ|j|j||j|jd'k(r ttlS#1swYxYw#tx$rd}YwxYwcc}w#t$rM}*|jLd%k\}+t|*|+|j},tj|,|+&tcYd}*~*Sd}*~*wwxYw)(Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT) check_targetzUsing %s)r9r3r8 isolated_modez=Target path exists but is not a directory, will not continue.target)kind)optionssession target_pythonrOinstall)deleterhglobally_managed)temp_build_dirri build_trackerrjfinderr6 verbosity) preparerrqri wheel_cacher6r?rOr>r;py_version_info)check_supported_wheels-)datawzutf-8)encodingF)indent ensure_asciic3XK|]"}|jd|jdf$yw)nameversionN)metadata).0rs ra z%InstallCommand.run..s/-ZZ'I)>?-s(*zWould install %s c3>K|]}dj|yw)rwN)join)ritems rarz%InstallCommand.run..s PD$ Pspip) modifying_pip)rtverify)roothomeprefixrAr6 pycompilerY)userrrrisolatedr)key)resolver_variantzSuccessfully installed %s)exc_infowarn)^r6r3rr.rCr8r9rSr r:r;r check_build_constraintscheck_dist_restrictionloggerverboser"decide_user_installrfr?ospathabspathexistsisdirr& enter_contextget_default_sessionr _build_package_finderrOrno_cleanget_requirementsr cache_dirpermit_editable_wheelsmake_requirement_preparerrr make_resolverr>python_versiontrace_basic_inforesolverrequirements_to_installr to_dictopenjsondumpsortedr%rr prepare_linked_requirements_morerGvaluesget_requirement satisfied_byKeyErrorr#is_wheelr)rget_installation_orderignore_dependenciesrB_determine_conflictsrArr@rYget_lib_location_guessesrsortoperator attrgetteriter_all_distributionsrcanonical_namergetrappend_warn_about_conflictsdetermine_resolver_variantOSErrorcreate_os_error_messageerrorr_handle_target_dirrZr$)-r_riargs#installing_into_current_environmentr;target_temp_dirtarget_temp_dir_pathrjrkrqrp directoryreqsrtreqrsresolverrequirement_setreportfwould_install_itemspip_reqrr reqs_to_build_build_failures to_install conflictsshould_warn_about_conflictsrA installed lib_locationsenvsummaryinstalled_versions distributionpackage display_namertextinstalled_descrshow_tracebackmessages- rarunzInstallCommand.runs0  W%7%7%CHI I=W%=%= > ,!!T) ,""d* ,##t+ , 077 $ &, ??&77 **73))'Ez?#45 3  ! !++))''!// ! 15+/   '+G $!#1C1C!DG w112GGMM'"4"45#S ,:O#2#7#7    /**73*73 ++'#*#A#A ,  **+<+>? !'''! c ((wHD$W%6%67K  2-1* 255(+%33..6H))!'%33!(!9!9'.'E'E ' 7 7!1 ' 6 6* H  ! !& )&..1C1C-C/O''+O,S,ST++s2FNN$45g66gNURS &.."2AaeTU&,-,DD-'#' * P#>? W$ %&|| ,001B<1PRVW*^1WI6D'Dt$ %$**%)%D%DW%M+ !XXg.N/"   " "?  # #""OW__   # #v -  !AUU0 & %  &Z !^^q0N-%%G LL>L :L sv+E\-([2A\/)\[?*(\\$\(G4\2[<7\? \ \ \\ ],A]'!],'],c t|g}td|j}|j}|j}|j }t jj|r|j|t jj|r||k7r|j|t jj|r|j||D]h} t j| D]L} | |k(r8t jj||  t fd|ddDrAt jj|| } t jj| r|stjd| t jj| rtjd| t jj| rt!j"| nt j$| t!j&t jj| | | Oky)N)rc3@K|]}|jywN) startswith)rsddirs rarz4InstallCommand._handle_target_dir..*sI!1<<-IszKTarget directory %s already exists. Specify --upgrade to force replacement.zTarget directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)r!rrpurelibplatlibrxrrrlistdirranyrwarningislinkrshutilrmtreeremovemove) r_r3rr: lib_dir_listscheme purelib_dir platlib_dirdata_dirlib_dirrtarget_item_dirrs @rarz!InstallCommand._handle_target_dirs : B_%9%9:nn nn ;; 77>>+ &    , 77>>+ &;++E    , 77>>( #    )# JG 7+ Jh&77<<$7DI|CR7HII "$'',,z4"@77>>/2">+ !ww~~o6', !ww}}_5 o6 /2 BGGLL$7I9 J Jrccb t|S#t$rtjdYywxYw)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)r Exceptionr exception)r_rs rarz#InstallCommand._determine_conflictsEs: *:6 6    N   s ..c |\}\}}|s|syg}|dk(r|jdn|dk(sJ|jd|D]3}||d}||D]!} |d|d| dd } |j| #5|D]G}||d}||D]5\} } } d j||| | | |dk(rd nd } |j| 7Itjdj |y)Nlegacyzpip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts. resolvelibzpip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.rrz requires rz, which is not installed.zg{name} {version} requires {requirement}, but {you} have {dep_name} {dep_version} which is incompatible.youzyou'll)rr requirementdep_name dep_versionr  )rformatrcriticalr)r_conflict_detailsr package_setmissing conflictingparts project_namer dependencyrr r rs rarz$InstallCommand._warn_about_conflictsQsX/?+ +g{{  x ' LL@  $|3 33 LL@ $ &L!,/2G%l3 & #nAgYjAH.. W%  & &( &L!,/2G.9,.G &*+sF&%# #% +"2l"B  W% & &  %()rcN)returnNone)rirr list[str]rint)r3strrr&r:boolrr)rzlist[InstallRequirement]rzConflictDetails | None)rrrrrr) __name__ __module__ __qualname____doc__usagerbrrrrrrcrar+r+Bs  0E~ @vvp4J4J0=4JHL4J 4Jl 2   0* /0*CF0* 0*rcr+cTtd|||||}|j|jgS)Nr)rrrrr)rrr)rrrrrrs rarrs5    F NNFNN ++rcc Ntdtt||DS)Nc32K|]}t|ywrr)rds rarz)site_packages_writable..s  !srr)allsetrr's rasite_packages_writabler*s) -4(KL rcc||stjdy|rS|r tdtr t dt j s t dtjdy|J|s|rtjdyt j stjd yt|| rtjd ytjd y) aZDetermine whether to do a user install based on the input options. If use_user_site is False, no additional checks are done. If use_user_site is True, it is checked for compatibility with other options. If use_user_site is None, the default behaviour depends on the environment, which is provided by the other arguments. z$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.zTCan not perform a '--user' install. User site-packages are disabled for this Python.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledr'z0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) rdebugrr(rsiteENABLE_USER_SITEr*info)r6r9r3r8rfs rarrs" !M ;< 3  !#6  $$#0   78   j JK   KL9}E GH KK  rccg}|jd|s,|jd|jt|n|jd|dxxdz cc<|jtjk(rUd}d}t s%|s#|j |d|j gn|j||jd t|tur"|jd |jd tr|jtjtjfvru|jritd t|jjDr|jd t!|jd kDr|jddj#|j%dzS)zrFormat an error message for an OSError It may occur anytime during the execution of the install command. z,Could not install packages due to an OSErrorz: .rr z"Consider using the `--user` optionzCheck the permissionsz or z. zHConsider checking your local proxy configuration with "pip config debug"c38K|]}t|dkDyw)N)len)rparts rarz*create_os_error_message..sF4s4y3FszHINT: This error might be caused by a file or folder name exceeding 255 characters, which is a Windows limitation even if long paths are enabled. izHINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths r)rrerrnoEACCESr'extendlowertyperrEINVALENOENTfilenamerrrr4rstrip)rrusing_user_siteruser_option_partpermissions_parts rarrsv E LL?@  T SZ  S "II {{ell"?2')/ LL$$**,  LL) * U E{o% V   U5;;5<<">>5>> F4+?+E+EF F LL"  u~~  $ LLC  775>   !D ((rc)FNNFN) rrr str | NonerrBrrrrBrr)rrBrrrr)NNNF) r6z bool | Noner9rBr3rBr8rBrfrrr)rrrrr?rrr)O __future__rr6rrrrr-optparserrpathlibrpip._vendor.packaging.utilsrpip._vendor.requests.exceptionsrpip._vendor.richr !pip._internal.self_outdated_checkrpip._internal.cacher pip._internal.clir pip._internal.cli.cmdoptionsr pip._internal.cli.req_commandr rpip._internal.cli.status_codesrrpip._internal.exceptionsrrrpip._internal.locationsrpip._internal.metadatar(pip._internal.models.installation_reportr,pip._internal.operations.build.build_trackerrpip._internal.operations.checkrrpip._internal.reqrpip._internal.req.req_installrpip._internal.utils.compatrpip._internal.utils.filesystemrpip._internal.utils.loggingrpip._internal.utils.miscr r!r"r#r$r%pip._internal.utils.temp_dirr&pip._internal.utils.virtualenvr'r(pip._internal.wheel_builderr)rrr+rr*rrr"rcrar^sr"  *9;')*(;: /2GJS0/<17. 8 *'*F , , , , ,  ,  ,$#!  BBBB B  B  BJA) A)$(A);?A)A)rc