
    0Ph	                     P    d Z ddlZddlZddlmZ ddlmZ ddlmZ d Z	d	 Z
d
 ZdS )z_
Utility methods to print system info for debugging

adapted from :func:`pandas.show_versions`
    N)threadpool_info   )__version__   )_openmp_parallelism_enabledc                      t           j                            dd          } d| fdt           j        fdt	          j                    fg}t          |          S )zsSystem information

    Returns
    -------
    sys_info : dict
        system and Python version information

    
 python
executablemachine)sysversionreplacer   platformdict)r   blobs     \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sklearn/utils/_show_versions.py_get_sys_infor      sU     [  s++F 
6	s~&	H%''(D ::    c                  x    g d} dt           i}ddlm}m} | D ]!}	  ||          ||<   # |$ r d||<   Y w xY w|S )a,  Overview of the installed version of main dependencies

    This function does not import the modules to collect the version numbers
    but instead relies on standard Python package metadata.

    Returns
    -------
    deps_info: dict
        version information on relevant Python libraries

    )	pip
setuptoolsnumpyscipyCythonpandas
matplotlibjoblibthreadpoolctlsklearnr   )PackageNotFoundErrorr   N)r   importlib.metadatar"   r   )deps	deps_infor"   r   modnames        r   _get_deps_infor'   '   s    
 
 
D 	;I A@@@@@@@ & &	&!(!1!1Ig# 	& 	& 	&!%Ig	&s   *
77c                      t                      } t                      }t          d           |                                 D ])\  }}t          d                    ||                     *t          d           |                                D ])\  }}t          d                    ||                     *t          d                    dt                                           t                      }|rt                       t          d           t          |          D ]Z\  }}|                                D ]\  }}t          |d	d
|            |t          |          dz
  k    rt                       YdS dS )zPrint useful debugging information"

    .. versionadded:: 0.20

    Examples
    --------
    >>> from sklearn import show_versions
    >>> show_versions()  # doctest: +SKIP
    z
System:z{k:>10}: {stat})kstatz
Python dependencies:z{k:>13}: {stat}z
{k}: {stat}zBuilt with OpenMPzthreadpoolctl info:z>15z: r   N)	r   r'   printitemsformatr   r   	enumeratelen)	sys_infor%   r)   r*   threadpool_resultsiresultkeyvals	            r   show_versionsr6   M   s    H  I	+>>## 8 84&&&667777	
"###??$$ 8 84&&&667777	!(C(E(E 	 	
 	
   )** #$$$"#566 	 	IAv"LLNN + +S)))C))****C*++a/// 	 	r   )__doc__r   r   r    r    r   _openmp_helpersr   r   r'   r6    r   r   <module>r;      s      



 ) ) ) ) ) )       8 8 8 8 8 8  (# # #L& & & & &r   