biocore / gemelli

Gemelli is a tool box for running Robust Aitchison PCA (RPCA), Joint Robust Aitchison PCA (Joint-RPCA), TEMPoral TEnsor Decomposition (TEMPTED), and Compositional Tensor Factorization (CTF) on sparse compositional omics datasets.
BSD 3-Clause "New" or "Revised" License
76 stars 18 forks source link

Error "ImportError: cannot import name 'ConstantInputWarning' from 'scipy.stats'" #79

Closed ivanllampy closed 10 months ago

ivanllampy commented 10 months ago

Hi all,

I experienced a long list of error when going through the tutorial of q2-gemelli, using QIIME2 version = amplicon-2023.9 The error occurs when I ran: qiime gemelli ctf \

The list of error is quite long, but ends with: ImportError: cannot import name 'ConstantInputWarning' from 'scipy.stats' (/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/scipy/stats/__init__.py)

Since then, the error appears for every command in the Qiime2 environment, even for activating a new Qiime2 environment doesn't work. So I re-install Qiime2 environment, then install q2-gemelli, q2-qurro, and q2-deicode. I repeat the command from tutorial after installing q2-gemelli, it works fine.

However, after I install q2-qurro, an error occur: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. umap-learn 0.5.4 requires tbb>=2019.0, which is not installed. Since then, the situation loops again, the "ImportError: cannot import name 'ConstantInputWarning' from 'scipy.stats'" re-appears.

Any help would be highly appreciated~! Thanks.

Here is the full list of the error: Traceback (most recent call last): File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/util.py", line 279, in get_plugin_manager return qiime2.sdk.PluginManager.reuse_existing() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 58, in reuse_existing raise UninitializedPluginManagerError qiime2.sdk.plugin_manager.UninitializedPluginManagerError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/bin/qiime", line 11, in <module> sys.exit(qiime()) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/click/core.py", line 1682, in invoke cmd_name, cmd, args = self.resolve_command(ctx, args) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/click/core.py", line 1729, in resolve_command cmd = self.get_command(ctx, cmd_name) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 100, in get_command plugin = self._plugin_lookup[name] File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/commands.py", line 76, in _plugin_lookup import q2cli.core.cache File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/core/cache.py", line 285, in <module> CACHE = DeploymentCache() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in __init__ self._state = self._get_cached_state(refresh=refresh) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state self._cache_current_state(current_requirements) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/core/cache.py", line 205, in _cache_current_state state = self._get_current_state() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/core/cache.py", line 253, in _get_current_state plugin_manager = q2cli.util.get_plugin_manager() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/q2cli/util.py", line 291, in get_plugin_manager return qiime2.sdk.PluginManager() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 67, in __new__ self._init(add_plugins=add_plugins) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 105, in _init plugin = entry_point.load() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2518, in load return self.resolve() File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2524, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/deicode/q2/plugin_setup.py", line 12, in <module> from deicode.rpca import rpca, auto_rpca File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/deicode/rpca.py", line 2, in <module> import skbio File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/skbio/__init__.py", line 11, in <module> import skbio.io # noqa File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/skbio/io/__init__.py", line 248, in <module> import_module('skbio.io.format.lsmat') File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/skbio/io/format/lsmat.py", line 77, in <module> from skbio.stats.distance import DissimilarityMatrix, DistanceMatrix File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/skbio/stats/distance/__init__.py", line 197, in <module> from ._mantel import mantel, pwmantel File "/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/skbio/stats/distance/_mantel.py", line 16, in <module> from scipy.stats import ConstantInputWarning ImportError: cannot import name 'ConstantInputWarning' from 'scipy.stats' (/Users/ivanllampy/miniconda3/envs/qiime2-amplicon-2023.9/lib/python3.8/site-packages/scipy/stats/__init__.py) (qiime2-amplicon-2023.9)

cameronmartino commented 10 months ago

Hi @ivanllampy,

This is likely an issue from the Qurro installation, see here for more. I will close this issue unless the problem persists and let the Qurro dev team help on an issue in that repo.

Thanks!

Cameron