B @`E@sddlZddlZddlZddlZdddddddd d d d d dddddddddd dddZdddddddd Zejed!d"d#Z d*eee ed'd(d)Z dS)+Nz4.6.0z1.2.1z0.7.4z0.3.2z0.6.0z4.3.0z2.2.3z2.6.8z1.3.0z2.5.7z0.12.0z0.15.0z5.0.1z1.0.6z0.4.0z1.2.0z1.2.8z3.5.1z0.8.3z0.12.3z1.0.2z0.46.0)bs4 bottleneckZfsspecZ fastparquetZgcsfsz lxml.etreeZ matplotlibZnumexprodfpyZopenpyxl pandas_gbqZpyarrowZpytestZpyxlsbZs3fsZscipy sqlalchemyZtablestabulateZxarrayZxlrdZxlwtZ xlsxwriterZnumbaZbeautifulsoup4Z Bottlenecklxmlrz pandas-gbqZ SQLAlchemyZJinja2)rrz lxml.etreeZodfrrZjinja2)modulereturncCs<t|dd}|dkr t|dd}|dkr8td|j|S)N __version__Z __VERSION__zCan't determine version for )getattr ImportError__name__)r versionr;/tmp/pip-unpacked-wheel-q9tj5l6a/pandas/compat/_optional.py _get_version1s   rTraise)nameextraraise_on_missing on_versionc Cst|}|dk r|n|}d|d|d|d}yt|}Wn(tk rh|r`t|dndSYnXt|}|rt|} tj | |kr|dkst d|d|d | d }|d krt |t dS|d krt||S) a Import an optional dependency. By default, if a dependency is missing an ImportError with a nice message will be raised. If a dependency is present, but too old, we raise. Parameters ---------- name : str The module name. This should be top-level only, so that the version may be checked. extra : str Additional text to include in the ImportError message. raise_on_missing : bool, default True Whether to raise if the optional dependency is not found. When False and the module is not present, None is returned. on_version : str {'raise', 'warn'} What to do when a dependency's version is too old. * raise : Raise an ImportError * warn : Warn that the version is too old. Returns None * ignore: Return the module, even if the version is too old. It's expected that users validate the version locally when using ``on_version="ignore"`` (see. ``io/html.py``) Returns ------- maybe_module : Optional[ModuleType] The imported module, when found and the version is correct. None is returned when the package is not found and `raise_on_missing` is False, or when the package's version is too old and `on_version` is ``'warn'``. NzMissing optional dependency 'z'. z Use pip or conda to install .>rwarnignorezPandas requires version 'z' or newer of 'z ' (version 'z' currently installed).rr)INSTALL_MAPPINGget importlib import_moduler VERSIONSr distutilsrZ LooseVersionAssertionErrorwarningsr UserWarning) rrrr package_nameZ install_namemsgr minimum_versionrrrrimport_optional_dependency<s*&      r()rTr) Zdistutils.versionr!rtypesr#r r ModuleTypestrrboolr(rrrrsH