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

Using holoviews tries to load plotly even if it is not installed #2198

Closed
mb-915 opened this issue Sep 3, 2024 · 2 comments · Fixed by #2199
Closed

Using holoviews tries to load plotly even if it is not installed #2198

mb-915 opened this issue Sep 3, 2024 · 2 comments · Fixed by #2199
Labels
bug Something isn't working

Comments

@mb-915
Copy link
Contributor

mb-915 commented Sep 3, 2024

Describe the bug

When I import holoviews, there is an error, marimo seems to be calling hv.renderer that tries to import plotly even if it is neither installed nor used.

Could not find a 'plotly' renderer, available renderers are: 'bokeh'.'

The error seem to be located here :

hv.renderer("bokeh").theme = (
"dark_minimal" if theme == "dark" else None
)
hv.renderer("plotly").theme = (
"plotly_dark" if theme == "dark" else "plotly"
)

I wrote a patch that I currently use (it is working for me):
mb-915@5c2e324
but I couldn't get the tests to pass and I’m not sure if adding bokeh in DependencyManager is right. Therefore, I'm not opening a PR for now.

Environment

{
  "marimo": "0.8.7",
  "OS": "Linux",
  "OS Version": "6.9.8-zen1",
  "Processor": "",
  "Python Version": "3.11.8",
  "Binaries": {
    "Browser": "--",
    "Node": "--"
  },
  "Requirements": {
    "click": "8.1.7",
    "importlib-resources": "missing",
    "jedi": "0.19.1",
    "markdown": "3.5.2",
    "pymdown-extensions": "10.7.1",
    "pygments": "2.17.2",
    "tomlkit": "0.13.2",
    "uvicorn": "0.30.6",
    "starlette": "0.38.4",
    "websockets": "12.0",
    "typing-extensions": "4.10.0",
    "ruff": "0.5.7"
  }
}

Code to reproduce

(in an environment without plotly)

import marimo as mo
import holoviews as hv
@mb-915 mb-915 added the bug Something isn't working label Sep 3, 2024
@mb-915 mb-915 changed the title holoviews tries to load plotly even if it is not installed Using holoviews tries to load plotly even if it is not installed Sep 3, 2024
@mscolnick
Copy link
Contributor

thank you for filing @mb-915! the patch looks correct (not sure why the tests would not pass). do you want to open a PR with that patch or would you like me to? I can look at the test failure reasons, if it does end up failing.

@mb-915
Copy link
Contributor Author

mb-915 commented Sep 3, 2024

i opened a PR #2199

The failing tests do not seem to be linked to the modification. There might be something in my dev environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants