dear sir
I am encountering an issue with my straightforward code that utilizes PyGWalker in conjunction with Streamlit. When I attempt to execute it, I receive an error related to the library:
from pygwalker.api.streamlit import StreamlitRenderer
The error message states: “ModuleNotFoundError: No module named ‘segment.analytics’.”
I would appreciate your guidance in resolving this matter.
see my code
import streamlit as st
from pygwalker.api.streamlit import StreamlitRenderer
import pandas as pd
df = pd.read_csv(“c:\iqra\mfa.csv”)
pyg_app = StreamlitRenderer(df)
pyg_app.explorer()
see error
ModuleNotFoundError: No module named ‘segment.analytics’
Traceback:
File "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^File "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec
exec(code, module.__dict__)File "C:\mfa\pygwakert.py", line 2, in <module>
from pygwalker.api.streamlit import StreamlitRendererFile "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pygwalker\__init__.py", line 16, in <module>
from pygwalker.api.jupyter import walk, render, tableFile "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pygwalker\api\jupyter.py", line 6, in <module>
from .pygwalker import PygWalkerFile "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pygwalker\api\pygwalker.py", line 29, in <module>
from pygwalker.services.upload_data import (File "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pygwalker\services\upload_data.py", line 9, in <module>
from pygwalker.communications.base import BaseCommunicationFile "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pygwalker\communications\base.py", line 4, in <module>
from pygwalker.services.track import track_eventFile "C:\Users\Ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pygwalker\services\track.py", line 3, in <module>
import segment.analytics as analytics