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

Dependency issue: sc.pp.scrublet require skimage implicitly #3459

Open
2 of 3 tasks
yswei96 opened this issue Feb 6, 2025 · 1 comment · May be fixed by #3463
Open
2 of 3 tasks

Dependency issue: sc.pp.scrublet require skimage implicitly #3459

yswei96 opened this issue Feb 6, 2025 · 1 comment · May be fixed by #3463

Comments

@yswei96
Copy link

yswei96 commented Feb 6, 2025

Please make sure these conditions are met

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the main branch of scanpy.

What happened?

I was using scrublet without installing package scikit-image. After an hour long run it complains ModuleNotFound. So I have to start it all over again. The scrublet method implicitly requires installation of skimage long after PCA is performed, which is frustruating and time consuming.The check of module availability should be done as early in the procedure as possible.

Minimal code sample

sc.pp.scrublet(adata)

Error output

ModuleNotFound Error 'skimage' 


>>>if threshold is None:
    >>>from skimage import threshold...

Versions

-----
anndata     0.10.9
scanpy      1.10.3
-----
PIL                         11.1.0
anyio                       NA
arrow                       1.3.0
asttokens                   NA
attr                        23.2.0
attrs                       23.2.0
babel                       2.14.0
certifi                     2022.12.07
cffi                        1.16.0
charset_normalizer          3.1.0
comm                        0.2.1
cycler                      0.10.0
cython_runtime              NA
dateutil                    2.8.2
debugpy                     1.8.1
decorator                   5.1.1
defusedxml                  0.7.1
exceptiongroup              1.2.0
executing                   2.0.1
fastjsonschema              NA
fqdn                        NA
h5py                        3.12.1
idna                        3.4
igraph                      0.11.8
ipykernel                   6.29.3
ipywidgets                  8.1.2
isoduration                 NA
jedi                        0.19.1
jinja2                      3.1.2
joblib                      1.4.2
json5                       NA
jsonpointer                 2.4
jsonschema                  4.21.1
jsonschema_specifications   NA
jupyter_events              0.9.0
jupyter_server              2.12.5
jupyterlab_server           2.25.3
kiwisolver                  1.4.4
lazy_loader                 0.4
legacy_api_wrap             NA
leidenalg                   0.10.2
llvmlite                    0.43.0
markupsafe                  2.1.2
matplotlib                  3.7.1
matplotlib_inline           0.1.6
mpl_toolkits                NA
natsort                     8.4.0
nbformat                    5.9.2
numba                       0.60.0
numpy                       1.24.2
overrides                   NA
packaging                   23.0
pandas                      1.5.3
parso                       0.8.3
patsy                       0.5.6
platformdirs                3.5.1
prometheus_client           NA
prompt_toolkit              3.0.43
psutil                      5.9.8
pure_eval                   0.2.2
pyarrow                     11.0.0
pycparser                   2.21
pydev_ipython               NA
pydevconsole                NA
pydevd                      2.9.5
pydevd_file_utils           NA
pydevd_plugins              NA
pydevd_tracing              NA
pygments                    2.14.0
pynndescent                 0.5.13
pyparsing                   3.0.9
pythonjsonlogger            NA
pytz                        2022.7.1
referencing                 NA
requests                    2.31.0
rfc3339_validator           0.1.4
rfc3986_validator           0.1.1
rpds                        NA
scipy                       1.15.1
seaborn                     0.13.2
send2trash                  NA
session_info                1.0.0
simplejson                  3.18.4
six                         1.16.0
skimage                     0.25.1
sklearn                     1.5.2
sniffio                     1.3.1
stack_data                  0.6.3
statsmodels                 0.14.4
texttable                   1.7.0
threadpoolctl               3.5.0
tornado                     6.4
tqdm                        4.65.0
traitlets                   5.14.1
typing_extensions           NA
umap                        0.5.7
uri_template                NA
urllib3                     1.26.15
wcwidth                     0.2.13
webcolors                   1.13
websocket                   1.7.0
yaml                        6.0
zmq                         25.1.2
-----
IPython             8.22.1
jupyter_client      8.6.0
jupyter_core        5.7.1
jupyterlab          4.1.2
notebook            7.1.1
-----
Python 3.10.9 (main, Mar  8 2023, 10:47:38) [GCC 11.2.0]
Linux-3.10.0-1160.62.1.el7.x86_64-x86_64-with-glibc2.17
-----
Session information updated at 2025-02-06 12:30
@yswei96 yswei96 added the Triage 🩺 This issue needs to be triaged by a maintainer label Feb 6, 2025
@ilan-gold ilan-gold removed the Triage 🩺 This issue needs to be triaged by a maintainer label Feb 11, 2025
@ilan-gold
Copy link
Contributor

This is totally expected though @yswei96. Our pyproject.toml has a scrublet section so you can do pip install scanpy[scrublet] to avoid this:

https://github.com/scverse/scanpy/blob/main/pyproject.toml#L148

@ilan-gold ilan-gold reopened this Feb 11, 2025
@ilan-gold ilan-gold linked a pull request Feb 12, 2025 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants