Error in conda activate qiime2-2021.4 environment

Hello to everyone
I got a problem in conda activate qiime2 environment after installed qiime2 and created the environment successfully on my linux(64bit) system from the installation tutorial but when i activate the qiime2 environment, I got the error as below.

Log file

conda activate qiime2-2021.4
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/liuy/anaconda3/envs/qiime2-2021.4/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 781, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 700, in make_context
    self.parse_args(ctx, args)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/click/command.py", line 43, in parse_args
    return super().parse_args(ctx, args)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 1209, in parse_args
    echo(ctx.get_help(), color=ctx.color)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 570, in get_help
    return self.command.get_help(self)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 975, in get_help
    self.format_help(ctx, formatter)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/click/core.py", line 1003, in format_help
    self.format_options(ctx, formatter)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/click/command.py", line 157, in format_options
    for subcommand in self.list_commands(ctx):
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/commands.py", line 92, in list_commands
    plugins = sorted(self._plugin_lookup)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/commands.py", line 76, in _plugin_lookup
    import q2cli.core.cache
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/core/cache.py", line 406, in <module>
    CACHE = DeploymentCache()
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/core/cache.py", line 200, in _cache_current_state
    state = self._get_current_state()
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2cli/core/cache.py", line 238, in _get_current_state
    plugin_manager = qiime2.sdk.PluginManager()
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 54, in __new__
    self._init(add_plugins=add_plugins)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 81, in _init
    plugin = entry_point.load()
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2472, in load
    return self.resolve()
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2478, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_vsearch/plugin_setup.py", line 12, in <module>
    import q2_vsearch._cluster_features
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/q2_vsearch/_cluster_features.py", line 15, in <module>
    import skbio
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/skbio/__init__.py", line 11, in <module>
    import skbio.io  # noqa
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/skbio/io/__init__.py", line 246, in <module>
    import_module('skbio.io.format.lsmat')
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/skbio/io/format/lsmat.py", line 77, in <module>
    from skbio.stats.distance import DissimilarityMatrix, DistanceMatrix
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/skbio/stats/distance/__init__.py", line 191, in <module>
    from ._base import (DissimilarityMatrixError, DistanceMatrixError,
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/skbio/stats/distance/_base.py", line 12, in <module>
    from IPython.core.pylabtools import print_figure
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/IPython/__init__.py", line 56, in <module>
    from .terminal.embed import embed
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/IPython/terminal/embed.py", line 16, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/IPython/terminal/interactiveshell.py", line 19, in <module>
    from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/prompt_toolkit/__init__.py", line 16, in <module>
    from .application import Application
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module>
    from .application import Application
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 42, in <module>
    from prompt_toolkit.buffer import Buffer
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/prompt_toolkit/buffer.py", line 46, in <module>
    from .search import SearchDirection, SearchState
  File "/home/liuy/anaconda3/envs/qiime2-2021.4/lib/python3.8/site-packages/prompt_toolkit/search.py", line 13, in <module>
    from .key_binding.vi_state import InputMode
ValueError: source code string cannot contain null bytes

system information
Linux version 3.10.0-693.el7.x86_64 (builder@kbuilder.dev.centos.org)
(gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) )

python information
/home/liuy/anaconda3/bin/python(3.8.8)

This problem has been bothering me all day long.
Can anyone help me? Thank you, stay well.

Hi @luernerliu, welcome to the :qiime2: forum!

I am looking into this, and will follow up with you on Monday morning with some next steps. Thanks for your patience! Hope you have a great weekend!

Cheers,
Liz

1 Like

Hi @luernerliu, thanks again for your patience here!

My suspicion here is that there is something going on with your current conda environment, or something unusual happened during your QIIME 2 installation process. I have a few suggestions and questions for you that may help us figure out the source of this issue.

My first recommendation here would be to uninstall and re-install QIIME 2. Starting from a clean slate can sometimes resolve any issues that have come up during the installation process.

conda env remove -n qiime2-2021.4

I noticed that you are using a Linux version from 2013 - are you able to update to a newer version? This may also resolve some unusual installation issues that can come up.

If neither of these suggestions resolves the issue, please share the output of the following commands:

conda list --revision
conda info
conda env list

This should provide us with more information on the state of your environment, and will give us some next steps if the above suggestions don't resolve the issue.

Cheers,
Liz

1 Like

Hi @lizgehret , Sorry for my late reply. Thanks for your help.
I've solved the problem by following your recommendation. I removed the qiime2 environment and reinstall the conda and update all. Then I recreated the qiime2 environment and ran successfully.

Really thanks for your help!

1 Like

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