deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Feat] Remove ipykernel and ipywidgets dependency?

Open tvst opened this issue 3 years ago • 2 comments

Target Use Case

Hi there! At Streamlit, we bring PyDeck in as a dependency because (1) we love it and use it in the streamlit hello app that most of our users see, and (2) we have a couple of Streamlit commands that depend on it (st.map and st.pydeck_chart), and we'd like to make users' lives easier when using those (i.e. no pip install pydeck required).

However, PyDeck brings in a whole lot of dependencies that cause Streamlit installed size to huge, and causes its installation to be slow (important for CI and production deployments).

This is such a big problem for us that we're currently considering removing PyDeck as a Streamlit dependency altogether ☹️

Meanwhile, it's unclear to me why ipykernel and ipywidgets need to be prod dependencies. My assumption is that those deps are there for Jupyter interop. But is it a common pattern for people to pip install pydeck in an environment where they never did a pip install jupyter first? It's very possible I'm missing something here, though...

Proposal

If the above makes sense to you, then I see two possible solutions:

  1. Remove ipykernel and ipywidgets from requirements.txt.

    In this case, you'd add those to requirements-dev.txt instead.

  2. Create a separate package without those deps

    For example pip install pydeck would continue bringing in the same deps as today, but pip install pydeck-minimal would forgo ipy* deps.

Thanks!

tvst avatar Jul 14 '22 18:07 tvst

I think this should be solved by https://github.com/visgl/deck.gl/pull/7125

kylebarron avatar Jul 14 '22 19:07 kylebarron

Ooooh that looks great!

tvst avatar Jul 14 '22 22:07 tvst