Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/core/magics/__pycache__/packaging.cpython-39.pyc
Ðазад
a o�h5 � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZm Z m Z dd� Zdd� Zh d �Z h d �Zh d�Zdd hZe G dd� de��ZdS )z5Implementation of packaging-related magic functions. � N)�Path)�Magics�magics_class� line_magicc s t �� �� fdd��}|S )Nc s( t tjdd��� std��� | i |��S )z>Return True if the current Python executable is in a conda env� conda-meta�historyzbThe python kernel does not appear to be a conda environment. Please use ``%pip install`` instead.)r �sys�prefix�exists� ValueError)�args�kwargs��func� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/core/magics/packaging.py�wrapper s �z%is_conda_environment.<locals>.wrapper)� functools�wraps)r r r r r �is_conda_environment s r c C sd t tj�j| }|�� r t|�S t tjdd�jdd�}tj d|� d�|tj d�}|r`|�� d S | S ) z�Find the path to the given executable Parameters ---------- executable: string Value should be: conda, mamba or micromamba r r zutf-8)�encodingz^#\s*cmd:\s*(?P<command>.*z)\s[create|install])�flags�command)r r � executable�parent�is_file�strr � read_text�re�search� MULTILINE� groupdict)r r r �matchr r r �_get_conda_like_executable# s �r# > �install�remove�upgrade� uninstall�list�update> r$ r% r&