galaxyproject / training-material

A collection of Galaxy-related training material
https://training.galaxyproject.org
MIT License
294 stars 842 forks source link

Conda installation in jupyter? #4879

Open hexylena opened 1 month ago

hexylena commented 1 month ago

@bgruening @Delphine-L I was pointed to this tutorial recently https://training.galaxyproject.org/training-material/topics/galaxy-interface/tutorials/galaxy-intro-jupyter/tutorial.html which suggests you can conda install a package and have it available but I cannot reproduce this, and the two mentioned packages seem to be preinstalked in the notebook.

is there a way to conda install something and have it available? when I use !conda info I see no environment activated so I would suspect that nothing will be on the path correctly

cc @mbaardwijk

Delphine-L commented 1 month ago

@hexylena What do you get when you try to install a package ? I tried it on main with the package multivelo, and it worked fine.

bgruening commented 1 month ago

Yes, this should work? Which Galaxy and which Jupyter are you using?

It should also work for Rstudio.

wm75 commented 1 month ago

It should also work for Rstudio.

Like here, for example: https://training.galaxyproject.org/training-material/topics/evolution/tutorials/mtb_phylogeny/tutorial.html#visualize-and-manipulate-the-tree

hexylena commented 1 month ago

huh interesting that it works for you!

after conda installing python-levenshtein it fails to become accessible;

Screenshot_20240403-092936

hexylena commented 1 month ago

Which Galaxy and which Jupyter are you using?.

eu of course, and jupylab

wm75 commented 1 month ago

import Levenshtein perhaps?

hexylena commented 1 month ago

also fails. testing multivelo now

hexylena commented 1 month ago

and resetting my API key because that screenshot leaked my notebook URL which means anyone could access it 😭

hexylena commented 1 month ago

honestly can't tell if this is better

Screenshot_20240403-094124

hexylena commented 1 month ago

yeah ok multivelo imports. thanks for the tip @Delphine-L

wm75 commented 1 month ago

Don't know what the problem with the IT context is, but in case python-levenshtein is really what you're trying to get to work: make sure you install from conda-forge (not bioconda) to get the latest version (0.25), and import Levenshtein (with the captial L) is definitely how you'd import it.

hexylena commented 1 month ago

No, it's a different package, squidpy, I was trying to produce a smaller/easier repro and guess I stumbled on a package that also works poorly with conda.

ImportError: /opt/conda/lib/python3.8/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/conda/lib/python3.8/site-packages/pandas/_libs/window/aggregations.cpython-38-x86_64-linux-gnu.so)

needs to be solved some other way I guess :grimacing:

bgruening commented 3 weeks ago

fwiw, I try to fix Squidpy but got stuck at https://github.com/conda-forge/xarray-dataclasses-feedstock/pull/2

hexylena commented 3 weeks ago

Thank you for trying @bgruening :(

hexylena commented 1 week ago

@bgruening reports that it should be fixed https://anaconda.org/conda-forge/squidpy/files which is fantastic news.