ImportError: cannot import name 'Table' from 'perspective' - in table_tutorial.ipynb
Closed this issue · 3 comments
Bug Report
ImportError: cannot import name 'Table' from 'perspective' - in table_tutorial.ipynb
Steps to Reproduce:
Downloaded notebook.
Created new Python venv.
Installed dependencies (key one is perspective-python).
Executed notebook (within VS Code).
Failed with error below at the initial import step. (I also tried a few typical Python tweaks to get the import to work without success).
Also tried the same experiment in Google Colab with the same error (after pip install of perspective-python).
Expected Result:
As per tutorial documentation.
Actual Result:
ImportError Traceback (most recent call last)
Cell In[2], line 1
----> 1 from perspective import Table
2 from datetime import date, datetime
3 import numpy as np
ImportError: cannot import name 'Table' from 'perspective' (/Users/username/code/github/databooth/tech_blog/.venv/lib/python3.11/site-packages/perspective/init.py
Environment:
Local environment (clean venv created just for testing out Perspective in a Jupyter context)
macOS 14.6.1 (23G93)
VS Code Version: 1.93.1
perspective-python==3.1.0
Python 3.11.10
notebook==7.2.2
pywidgets==8.1.5
Also tried independently on Google Colab (with a pip install of perspective-python) and received the same error.
Additional Context:
Nice work on the package - examples look cool and useful.
Please note that I also noticed some broken links in the Python API docs from this page:
https://perspective.finos.org/docs/python/
e.g.
P.s. In case it is helpful/relevant
jupyter labextension list
JupyterLab v4.2.5
/Users/username/code/github/databooth/tech_blog/.venv/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
@finos/perspective-jupyterlab v3.1.0 enabled OK (python, perspective-python)
@jupyter-notebook/lab-extension v7.2.2 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.13 enabled OK (python, jupyterlab_widgets)
We do not offer a top level Table
class constructor anymore, to make a table, create a Client
and call client.table(...)
. Here is an example of usage
Please refer to the up-to-date docs on docs.rs
. I've created #2777 to track 3.x
documentation updates, closing this issue.