o
    eH                     @   sn   d dl mZ d dlmZ d dlmZ defddZdefddZde	fd	d
Z
defddZdefddZdS )    )
ModuleType)Version)versionreturnc                  C   s   d} zt d}t|t| k rtd|  d| dd l}|W S  tyB } ztd|  d|  d|  d	|  d
|jd  
|d }~ww )Nz1.4.0
vegafusionz'The vegafusion package must be version  or greater. Found version r   zVThe "vegafusion" data transformer and chart.transformed_data feature requires
version z or greater of the 'vegafusion-python-embed' and 'vegafusion' packages.
These can be installed with pip using:
    pip install "vegafusion[embed]>=zR"
Or with conda using:
    conda install -c conda-forge "vegafusion-python-embed>=z" "vegafusion>="

ImportError: )importlib_versionr   RuntimeErrorr   ImportErrorargs)min_versionr   Zvferr r   W/root/Voice_Assist/myprojectenv/lib/python3.10/site-packages/altair/utils/_importers.pyimport_vegafusion   s:   	r   c                  C   s   d} zt d}t|t| k rtd|  d| dd l}|W S  ty? } ztd|  d|  d|  d	|jd  |d }~ww )
Nz1.1.0zvl-convert-pythonz.The vl-convert-python package must be version r   r   zKThe vl-convert Vega-Lite compiler and file export feature requires
version zz or greater of the 'vl-convert-python' package. 
This can be installed with pip using:
   pip install "vl-convert-python>=z@"
or conda:
   conda install -c conda-forge "vl-convert-python>=r   )r	   r   r
   Z
vl_convertr   r   )r   r   Zvlcr   r   r   r   import_vl_convert   s6   r   c                  C   s$   ddl m}  d| dd d S )N   SCHEMA_VERSION_.)Zvegaliter   joinsplitr   r   r   r   vl_version_for_vl_convert7   s   r   c                  C   s   d} zt d}t|t| k rtd|  d| dd lm} |W S  tyA } ztd|  d|  d|  d	|jd  |d }~ww )
Nz11.0.0Zpyarrowz$The pyarrow package must be version r   r   z=Usage of the DataFrame Interchange Protocol requires
version zd or greater of the pyarrow package. 
This can be installed with pip using:
   pip install "pyarrow>=z6"
or conda:
   conda install -c conda-forge "pyarrow>=r   )r	   r   r
   Zpyarrow.interchangeZinterchanger   r   )r   r   pir   r   r   r   import_pyarrow_interchange?   s6   r   c                   C   s"   zt   W dS  ty   Y dS w )NTF)r   r   r   r   r   r   pyarrow_availableX   s   r   N)typesr   Zpackaging.versionr   importlib.metadatar   r	   r   r   strr   r   boolr   r   r   r   r   <module>   s    