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

remove umap.plot import in _umap.py #10

Open
galicae opened this issue Mar 14, 2023 · 0 comments
Open

remove umap.plot import in _umap.py #10

galicae opened this issue Mar 14, 2023 · 0 comments

Comments

@galicae
Copy link

galicae commented Mar 14, 2023

I tried installing pyliger on a fresh conda env with different versions of Python and consistently failed to load the library. Steps to reproduce the problem:

> mamba create -n test python=3.10
> mamba activate test
> pip install pyliger
> python
>>> import pyliger

I got the following error:

/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/umap/plot.py:20: UserWarning: The umap.plot package requires extra plotting libraries to be installed.
    You can install these via pip using

    pip install umap-learn[plot]

    or via conda using

     conda install pandas matplotlib datashader bokeh holoviews colorcet scikit-image

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/pyliger/__init__.py", line 5, in <module>
    from .plotting import plot_by_dataset_and_cluster, plot_gene, plot_gene_loadings, plot_spatial
  File "/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/pyliger/plotting/__init__.py", line 3, in <module>
    from ._gene_loadings import plot_gene_loadings
  File "/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/pyliger/plotting/_gene_loadings.py", line 7, in <module>
    from ..tools import calc_dataset_specificity, get_factor_markers
  File "/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/pyliger/tools/__init__.py", line 2, in <module>
    from ._umap import run_umap
  File "/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/pyliger/tools/_umap.py", line 2, in <module>
    import umap.plot
  File "/Users/myusername/mambaforge/envs/test/lib/python3.10/site-packages/umap/plot.py", line 31, in <module>
    raise ImportError(
ImportError: umap.plot requires pandas matplotlib datashader bokeh holoviews scikit-image and colorcet to be installed

By going to the mamba installation directory and removing the offending line I was able to circumvent the issue. Maybe a forgotten import statement that could be removed?

import umap.plot

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

1 participant