Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lida fails in numpy > 2 environment #138

Open
ankitkpandey1 opened this issue Sep 30, 2024 · 0 comments
Open

Lida fails in numpy > 2 environment #138

ankitkpandey1 opened this issue Sep 30, 2024 · 0 comments

Comments

@ankitkpandey1
Copy link

If numpy > 2 is installed, LIDA fails to with below error.
Issue resolves if numpy is downgrade but I think internal libraries can be bumped up to handle this.

image
Full traceback:

ImportError                               Traceback (most recent call last)
Cell In[1], line 1
----> 1 from lida import Manager, llm
      3 lida = Manager(text_gen = llm("openai"))

File ~/bom/kyoto/venv/lib/python3.10/site-packages/lida/__init__.py:2
      1 from llmx import TextGenerationConfig, llm, TextGenerator
----> 2 from .components.manager import Manager
      5 __all__ = ["TextGenerationConfig", "llm", "TextGenerator", "Manager"]

File ~/bom/kyoto/venv/lib/python3.10/site-packages/lida/components/__init__.py:1
----> 1 from .summarizer import Summarizer
      2 from .viz import *
      3 from .goal import *

File ~/bom/kyoto/venv/lib/python3.10/site-packages/lida/components/summarizer.py:5
      3 from typing import Union
      4 import pandas as pd
----> 5 from lida.utils import clean_code_snippet, read_dataframe
      6 from lida.datamodel import TextGenerationConfig
      7 from llmx import TextGenerator

File ~/bom/kyoto/venv/lib/python3.10/site-packages/lida/utils.py:10
      8 import pandas as pd
      9 import re
---> 10 import matplotlib.pyplot as plt
     11 import tiktoken
     12 from diskcache import Cache

File ~/bom/kyoto/venv/lib/python3.10/site-packages/matplotlib/__init__.py:131
    127 from packaging.version import parse as parse_version
    129 # cbook must import matplotlib only within function
    130 # definitions, so it is safe to import from it here.
--> 131 from . import _api, _version, cbook, _docstring, rcsetup
    132 from matplotlib.cbook import sanitize_sequence
    133 from matplotlib._api import MatplotlibDeprecationWarning

File ~/bom/kyoto/venv/lib/python3.10/site-packages/matplotlib/rcsetup.py:27
     25 from matplotlib import _api, cbook
     26 from matplotlib.cbook import ls_mapper
---> 27 from matplotlib.colors import Colormap, is_color_like
     28 from matplotlib._fontconfig_pattern import parse_fontconfig_pattern
     29 from matplotlib._enums import JoinStyle, CapStyle

File ~/bom/kyoto/venv/lib/python3.10/site-packages/matplotlib/colors.py:56
     54 import matplotlib as mpl
     55 import numpy as np
---> 56 from matplotlib import _api, _cm, cbook, scale
     57 from ._color_data import BASE_COLORS, TABLEAU_COLORS, CSS4_COLORS, XKCD_COLORS
     60 class _ColorMapping(dict):

File ~/bom/kyoto/venv/lib/python3.10/site-packages/matplotlib/scale.py:22
     20 import matplotlib as mpl
     21 from matplotlib import _api, _docstring
---> 22 from matplotlib.ticker import (
     23     NullFormatter, ScalarFormatter, LogFormatterSciNotation, LogitFormatter,
     24     NullLocator, LogLocator, AutoLocator, AutoMinorLocator,
     25     SymmetricalLogLocator, AsinhLocator, LogitLocator)
     26 from matplotlib.transforms import Transform, IdentityTransform
     29 class ScaleBase:

File ~/bom/kyoto/venv/lib/python3.10/site-packages/matplotlib/ticker.py:138
    136 import matplotlib as mpl
    137 from matplotlib import _api, cbook
--> 138 from matplotlib import transforms as mtransforms
    140 _log = logging.getLogger(__name__)
    142 __all__ = ('TickHelper', 'Formatter', 'FixedFormatter',
    143            'NullFormatter', 'FuncFormatter', 'FormatStrFormatter',
    144            'StrMethodFormatter', 'ScalarFormatter', 'LogFormatter',
   (...)
    150            'MultipleLocator', 'MaxNLocator', 'AutoMinorLocator',
    151            'SymmetricalLogLocator', 'AsinhLocator', 'LogitLocator')

File ~/bom/kyoto/venv/lib/python3.10/site-packages/matplotlib/transforms.py:49
     46 from numpy.linalg import inv
     48 from matplotlib import _api
---> 49 from matplotlib._path import (
     50     affine_transform, count_bboxes_overlapping_bbox, update_path_extents)
     51 from .path import Path
     53 DEBUG = False

ImportError: numpy.core.multiarray failed to import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant