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

Numpy Dependency #100

Open
MrMuhannadObeidat opened this issue Feb 28, 2025 · 1 comment
Open

Numpy Dependency #100

MrMuhannadObeidat opened this issue Feb 28, 2025 · 1 comment
Labels
question Further information is requested

Comments

@MrMuhannadObeidat
Copy link

MrMuhannadObeidat commented Feb 28, 2025

pip install is complaining that fastrtc dependency for numpy is older than the version that I have.
numpy-2.2.3 is installed.
If you uninstall numpy then install fastrtc and let pip figure out the right version to install then you get numpy-2.1.3 .

When trying to run a streamlit app with a dependency on fastrtc, you get this error:
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec
    exec(code, module.__dict__)
  File "/private/tmp/fast2.py", line 3, in <module>
    from fastrtc import ReplyOnPause, Stream
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/fastrtc/__init__.py", line 9, in <module>
    from .stream import Stream
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/fastrtc/stream.py", line 12, in <module>
    import gradio as gr
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio._simple_templates
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/gradio/_simple_templates/__init__.py", line 1, in <module>
    from .simpledropdown import SimpleDropdown
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/gradio/_simple_templates/simpledropdown.py", line 6, in <module>
    from gradio.components.base import Component, FormComponent
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/gradio/components/__init__.py", line 40, in <module>
    from gradio.components.native_plot import BarPlot, LinePlot, NativePlot, ScatterPlot
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/gradio/components/native_plot.py", line 16, in <module>
    import pandas as pd
  File "/Users/MOBEIDAT/projects/transformers/lib/python3.11/site-packages/pandas/__init__.py", line 22, in <module>
    from pandas.compat import is_numpy_dev as _is_numpy_dev  # pyright: ignore # noqa:F401
@freddyaboulton
Copy link
Owner

Mm makes me think that a version of pandas got installed that assumes numpy 1.0? Can you upgrade pandas or maybe install in a fresh env?

@freddyaboulton freddyaboulton added the question Further information is requested label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants