PICRUSt2 installation refresh-cache error

Currently manually installing PICRUSt2. Downloaded install file from https://github.com/gavinmdouglas/q2-picrust2 - version 2019.10.

Running in Conda environment version 4.9.2
Python version: 3.8.3

Following code worked well:

conda install -c bioconda -c conda-forge picrust2
cd picrust2-file-downlaod
pip install -e .

When I go do to:

conda dev refresh-cache

The following error is returned:


(qiime2-2020.8) [email protected]_64-apple-darwin13 ~ % 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.
Traceback (most recent call last):
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/builtin/dev.py", line 31, in refresh_cache
    import q2cli.core.cache
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/core/cache.py", line 406, in <module>
    CACHE = DeploymentCache()
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/core/cache.py", line 200, in _cache_current_state
    state = self._get_current_state()
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/core/cache.py", line 238, in _get_current_state
    plugin_manager = qiime2.sdk.PluginManager()
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 54, in __new__
    self._init(add_plugins=add_plugins)
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 81, in _init
    plugin = entry_point.load()
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2472, in load
    return self.resolve()
  File "/Users/z_m/opt/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2478, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/z_m/Desktop/q2-picrust2-2019.10_0/q2_picrust2/__init__.py", line 9, in <module>
    from ._full_pipeline import full_pipeline
  File "/Users/z_m/Desktop/q2-picrust2-2019.10_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'

I can’t even initialize QIIME2 now without throwing this error. Anyone know how I resolve this?

Hi @zlmg2b,
Unfortunately q2-picrust2 is currently only compatible with the QIIME 2 version 2019.2 (see here for a previous example of this issue). For now, you can either install 2019.2 version of QIIME 2 (in a separate conda environment) to run q2-picrust2 with or run the stand-alone picrust2 tool outside of QIIME 2.

As for the error, I think uninstalling q2-picrust2 (and anything else that got installed with it) and refreshing the cache should get rid of that.

1 Like

Same problem, and uninstalling q2-picrust2 perfectly works! :slight_smile:

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.