QIIME2 Error after Installing RESCRIPt

Hello,

After installing RESCRIPt on Ubuntu 16.04 (QIIME2-2020.2 installed via conda) using

conda create -y -n rescript
conda activate rescript
conda install \
  -c conda-forge -c bioconda -c qiime2 -c defaults \
  qiime2 q2cli q2templates q2-types q2-longitudinal q2-feature-classifier "pandas>=0.25.3" xmltodict

pip install git+https://github.com/bokulich-lab/RESCRIPt.git

I get the following error below. I cannot execute any commands in QIIME2 anymore, as this error pops up. I haven’t installed any other packages in my conda environment lately, such as Songbird or Tensorflow. This error only began after installing RESCRIPt. I’ve also tried running qiime dev refresh-cache, with the same error appearing.

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 "/home/dunfield/anaconda3/envs/qiime2-2020.2/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 716, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 641, in make_context
    self.parse_args(ctx, args)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/click/command.py", line 43, in parse_args
    return super().parse_args(ctx, args)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 1086, in parse_args
    echo(ctx.get_help(), color=ctx.color)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 516, in get_help
    return self.command.get_help(self)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 879, in get_help
    self.format_help(ctx, formatter)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 898, in format_help
    self.format_options(ctx, formatter)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/click/command.py", line 157, in format_options
    for subcommand in self.list_commands(ctx):
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 92, in list_commands
    plugins = sorted(self._plugin_lookup)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 76, in _plugin_lookup
    import q2cli.core.cache
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 404, in <module>
    CACHE = DeploymentCache()
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 200, in _cache_current_state
    state = self._get_current_state()
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 238, in _get_current_state
    plugin_manager = qiime2.sdk.PluginManager()
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 54, in __new__
    self._init(add_plugins=add_plugins)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 81, in _init
    plugin = entry_point.load()
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/rescript/plugin_setup.py", line 24, in <module>
    from .get_data import get_silva_data
  File "/home/dunfield/anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/rescript/get_data.py", line 19, in <module>
    from q2_types.feature_data import RNAFASTAFormat
ImportError: cannot import name 'RNAFASTAFormat'

Does anyone know how I can stop this error and get qiime2 working again with RESCRIPt installed? Any help with this is greatly appreciated.

Hello @Chantel ,
You are running incompatible versions of QIIME 2 (2020.2) and RESCRIPt (2021.4). Please see here for an explanation:

For clarification on what the error message indicates: in the latest releases of QIIME 2 and RESCRIPt we moved some code from RESCRIPt (that defines some RNA types) into q2-types — so versions of QIIME 2 and RESCRIPt > 2021.4 are incompatible with earlier versions of the other.

Good luck!

2 Likes

Thank you so much, Nicholas! I just figured this out.

QIIME2 and RESCRIPt now work fine after installing QIIME2-2021.4.

Thank you, I appreciate the explanation!

2 Likes