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

Issues with trame #743

Closed
bjlittle opened this issue Mar 5, 2024 · 13 comments
Closed

Issues with trame #743

bjlittle opened this issue Mar 5, 2024 · 13 comments

Comments

@bjlittle
Copy link
Owner

bjlittle commented Mar 5, 2024

So I've just created a new working environment in a new workspace, and
pv.set_jupyter_backend("trame") totally does not work.

No matter if I reinstall or update ipywidgets, trame, and vtk I get the following error:
image

What do I do?

Originally posted by @yutik-nn in #452 (comment)

Copy link

welcome bot commented Mar 5, 2024

📢 Nice one! Your first issue! Thanks for telling us how to improve geovista 📢

@bjlittle
Copy link
Owner Author

bjlittle commented Mar 5, 2024

@yutik-nn I've created a dedicated issue from your comment, hope you don't mind?

@bjlittle
Copy link
Owner Author

bjlittle commented Mar 5, 2024

@yutik-nn Good to hear from you again 😃

Okay, so can you give me a little more detail, and hopefully we can resolve this for you.

Would it be possible to tell me how you're creating your environment?

Also, could you run this on your command line scooby --report geovista (within your active development environment) and paste the output in this issue, thanks.

@bjlittle bjlittle self-assigned this Mar 5, 2024
@yutik-nn
Copy link

yutik-nn commented Mar 5, 2024

Aloha @bjlittle !!! Getting back into it with some new data as well.
So some other things stopped working and my other environment was old and overflooded so I needed a clean slate.
This new one is micromamba, and I installed all packages for geovista (like trame, vtk, ipywidgets) with conda forge.
Unfortunately I deleted my old environment where geovista/trame worked last so I can't test that.
scooby --report geovista gives the following:
Python 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:35:25) [Clang 16.0.6 ]
cartopy : 0.22.0
click : 8.1.7
click-default-group : 1.2.4
cmocean : 3.1.3
colorcet : 3.0.1
geovista : 0.4.1
matplotlib : 3.8.3
netcdf4 : 1.6.5
numpy : 1.26.4
platformdirs : 4.2.0
pooch : 1.8.1
pykdtree : 1.3.11
pyproj : 3.6.1
pyvista : 0.43.3
scooby : 0.9.2
vtk : 9.3.0
IPython : 8.22.1
PyQt5 : 5.15.9
imageio : 2.34.0
jupyter_server_proxy : 4.1.0
jupyterlab : 4.1.2
nest_asyncio : 1.6.0
pandas : 2.1.4
scipy : 1.12.0
trame : 3.5.2
trame_client : 2.16.2
trame_server : 2.17.2
tqdm : 4.66.2

Thank you!!!

@yutik-nn
Copy link

yutik-nn commented Mar 7, 2024

@bjlittle Does anything look suspicious?

@bjlittle
Copy link
Owner Author

bjlittle commented Mar 7, 2024

Apologies @yutik-nn, I'll look into this for you now 👍

@bjlittle
Copy link
Owner Author

bjlittle commented Mar 7, 2024

... okay, I can confirm that I can certainly replicate this issue on my side.

Clearly something has changed in the ecosystem recently 🤔

@bjlittle
Copy link
Owner Author

bjlittle commented Mar 8, 2024

Aloha @yutik-nn 🏄

Okay, cracked it ... sorry for the delay.

It took me a wee bit of time to figure this one out (also, I'm spinning too many plates atm, soz)

Create a conda YAML spec file, say called env.yml, with at least the following:

name: aloha

channels:
  - conda-forge

dependencies:
  - geovista
  - ipywidgets <9.0.0
  - jupyterlab <5.0.0
  - trame >=2.5.2
  - trame-client >=2.12.7
  - trame-server >=2.11.7
  - trame-vtk >=2.5.8
  - trame-vuetify >=2.3.1

Now create your conda environment with the YAML file i.e., if you're using micromamba, then I think it's just simply:

micromamba create -f env.yml

Then activate your aloha environment and start jupyter lab.

Out the box, execute the following in a jupyter lab cell:

import pyvista as pv
pv.Cube().plot()

image

This should just-work™️, hopefully 🤞

Please let me know how it goes.

@bjlittle
Copy link
Owner Author

@yutik-nn Does this fix your issue?

Keen to make sure you're unblocked 👍

@yutik-nn
Copy link

@bjlittle Thank you Bill! It did fix the issue!
Now I will need to install other needed packages on top of the foundation you outlined above, and hope nothing breaks :)
🙏🏼🙏🏼🙏🏼

@bjlittle
Copy link
Owner Author

@yutik-nn That's awesome news!

I'd recommend creating your environment from scratch with your additional packages in the YAML file, if possible.

Now that you have a working YAML file you can easily delete and recreate the environment as you choose.

Feel free to close this issue, or leave it open if you need more assistance - always glad to help 👍

@bjlittle
Copy link
Owner Author

@all-contributors please add @yutik-nn for ideas

Copy link
Contributor

@bjlittle

I've put up a pull request to add @yutik-nn! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants