QIIME2 - installation issue with incorrect Python/NumPy version

Hi all,

To preface, I'm pretty new to most coding-related stuff, and I'm having trouble figuring out how to properly load the QIIME2 environment. For reference, I'm using MobaXterm on Windows 10.

I used the following lines of code to install/activate QIIME2:

wget https://data.qiime2.org/distro/core/qiime2-2021.11-py38-linux-conda.yml
conda env create -n qiime2-2021.11 --file qiime2-2021.11-py38-linux-conda.yml
conda activate qiime2-2021.11

However, when I run that, I get the following error message:

(base) -bash-4.2$ conda activate qiime2-2021.11
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 "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/bin/qiime", line 11, in <module>
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 716, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 641, in make_context
    self.parse_args(ctx, args)
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/click/command.py", line 43, in parse_args
    return super().parse_args(ctx, args)
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 1086, in parse_args
    echo(ctx.get_help(), color=ctx.color)
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 516, in get_help
    return self.command.get_help(self)
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 879, in get_help
    self.format_help(ctx, formatter)
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/click/core.py", line 898, in format_help
    self.format_options(ctx, formatter)
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/click/command.py", line 157, in format_options
    for subcommand in self.list_commands(ctx):
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 92, in list_commands
    plugins = sorted(self._plugin_lookup)
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/commands.py", line 76, in _plugin_lookup
    import q2cli.core.cache
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/core/cache.py", line 285, in <module>
    CACHE = DeploymentCache()
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/core/cache.py", line 205, in _cache_current_state
    state = self._get_current_state()
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/core/cache.py", line 253, in _get_current_state
    plugin_manager = q2cli.util.get_plugin_manager()
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/q2cli/util.py", line 221, in get_plugin_manager
    import qiime2.sdk
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/__init__.py", line 9, in <module>
    from qiime2.sdk import Artifact, Visualization
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/__init__.py", line 10, in <module>
    from .action import Action, Method, Visualizer, Pipeline
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/sdk/action.py", line 20, in <module>
    import qiime2.core.type as qtype
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/core/type/__init__.py", line 10, in <module>
    from .semantic import SemanticType, Properties
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/core/type/semantic.py", line 15, in <module>
    from qiime2.core.type.util import is_semantic_type, is_qiime_type
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/core/type/util.py", line 13, in <module>
    from qiime2.core.type.primitive import Int, Float, Bool, Str
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/core/type/primitive.py", line 13, in <module>
    import qiime2.metadata as metadata
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/metadata/__init__.py", line 9, in <module>
    from .metadata import (Metadata, MetadataColumn, NumericMetadataColumn,
  File "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/lib/python3.8/site-packages/qiime2/metadata/metadata.py", line 16, in <module>
    import pandas as pd
  File "/opt/software/Python/3.7.2-GCCcore-8.2.0/lib/python3.7/site-packages/pandas/__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:


Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was

We have compiled some common reasons and troubleshooting tips at:


Please note and check the following:

  * The Python version is: Python3.8 from "/mnt/home/bagchioi/miniconda3/envs/qiime2-2021.11/bin/python"
  * The NumPy version is: "1.21.3"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

I ended up removing the environment and reinstalling everything with the following:

conda env remove -n qiime2-2021.11
conda clean -y --all
conda update conda
conda install wget
wget https://data.qiime2.org/distro/core/qiime2-2021.11-py38-linux-conda.yml
conda env create -n qiime2-2021.11 --file qiime2-2021.11-py38-linux-conda.yml

And I am still getting the exact same issue. When I check which version of python I am using, it says I'm on version 3.7.2. However, when I look at the environment, the version there is 3.8 something, so I do not know (or understand) why it's using 3.7.2. Code is shown below.

(qiime2-2021.11) -bash-4.2$ which python

Any and all help would be appreciated.

Forgot to mention this in my original post, but I am using miniconda

Hi @oishi-b,

Welcome to the :qiime2: forum!

Thanks for providing all of those details. I am not too familiar with MobaXterm, but from some initial browsing on their docs page, this seems a bit different than WSL (Windows Subsystem for Linux). Do you have WSL installed? This is our recommended QIIME 2 installation route for Windows users, which will allow you to run a Linux environment directly on Windows without having to utilize a virtual machine or dual-booting. Here are install instructions for WSL, if you don't already have this set up on your machine.

Once that's complete, you can install the latest version of QIIME 2 (2022.2) using the WSL-specific instructions.

Hope this helps! Please reach back out if you are still running into this error after installing WSL and installing the latest version of QIIME 2.

Cheers :lizard:

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