picrust / picrust2

Code, unit tests, and tutorials for running PICRUSt2
GNU General Public License v3.0
329 stars 104 forks source link

q2-picrust2-2021.11_0 will not install with qiime 2023.2 #295

Closed scottdaniel closed 1 year ago

scottdaniel commented 1 year ago

In following the instructions for manual installation of the qiime picrust2 plugin I got the following error:

(qiime2-2023.2) [danielsg@reslnvvhpc0156 q2-picrust2-2021.11_0]$ qiime dev refresh-cache
QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.
/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/picrust2/metagenome_pipeline.py:12: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  from pandas.util.testing import assert_frame_equal
Traceback (most recent call last):
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/util.py", line 266, in get_plugin_manager
    return qiime2.sdk.PluginManager.reuse_existing()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/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 "/home/danielsg/miniconda3/envs/qiime2-2023.2/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/builtin/dev.py", line 33, in refresh_cache
    import q2cli.core.cache
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 285, in <module>
    CACHE = DeploymentCache()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 205, in _cache_current_state
    state = self._get_current_state()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/core/cache.py", line 253, in _get_current_state
    plugin_manager = q2cli.util.get_plugin_manager()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/q2cli/util.py", line 278, in get_plugin_manager
    return qiime2.sdk.PluginManager()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 67, in __new__
    self._init(add_plugins=add_plugins)
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 105, in _init
    plugin = entry_point.load()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2477, in load
    return self.resolve()
  File "/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2483, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/danielsg/q2-picrust2-2021.11_0/q2_picrust2/__init__.py", line 9, in <module>
    from ._full_pipeline import full_pipeline
  File "/home/danielsg/q2-picrust2-2021.11_0/q2_picrust2/_full_pipeline.py", line 7, in <module>
    from picrust2.default import (default_ref_dir, default_tables,
ImportError: cannot import name 'default_ref_dir' from 'picrust2.default' (/home/danielsg/miniconda3/envs/qiime2-2023.2/lib/python3.8/site-packages/picrust2/default.py)

Note: picrust2 was only able to install the oldest version for some reason (v2.0.3_b)

My full qiime2 environment setup is here (linux-64): https://github.com/scottdaniel/16S_QIIME2/blob/dev/environment.yml

gavinmdouglas commented 1 year ago

Hi there,

It looks like there are some version incompatibilities for dependencies used by PICRUSt2 and the most recent version of QIIME 2 (one incompatibility is the version of h5py used). For now I think you would need to use an older version of QIIME 2 or use the standalone version of PICRUSt2.

Cheers,

Gavin

gavinmdouglas commented 1 year ago

Hi there,

I just made a new q2-picrust2 release to match 2023.2, so you can now update to that!

Cheers,

Gavin

scottdaniel commented 1 year ago

Awesome, thank you!