ImportError: dynamic module does not define module export function (PyInit__path)

I am running following command to cretics .qzv file from metadata.tsv and getting following error. I am not sure what is the issue and how to resolve it.

Many thanks.

Command: qiime metadata tabulate --m-input-file /home/metadata2.tsv --o-visualization /home/tabulated-fasting-metadata.qzv

Traceback (most recent call last):
File “/opt/conda/envs/qiime2-2020.2/bin/qiime”, line 11, in
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/”, line 305, in call
action = self._get_action()
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/”, line 270, in _get_action
pm = qiime2.sdk.PluginManager()
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 54, in new
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 81, in _init
plugin = entry_point.load()
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/”, line 2445, in load
return self.resolve()
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/”, line 2451, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_vsearch/”, line 12, in
import q2_vsearch._cluster_features
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_vsearch/”, line 15, in
import skbio
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/”, line 15, in
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/io/”, line 309, in
File “/opt/conda/envs/qiime2-2020.2/lib/python3.6/importlib/”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/io/”, line 123, in
from skbio.alignment import Alignment
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/alignment/”, line 230, in
from ._alignment import Alignment, SequenceCollection, StockholmAlignment
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/alignment/”, line 21, in
from skbio.stats.distance import DistanceMatrix
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/stats/distance/”, line 193, in
from ._base import (DissimilarityMatrixError, DistanceMatrixError,
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/skbio/stats/distance/”, line 16, in
import matplotlib.pyplot as plt
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/”, line 27, in
import matplotlib.colorbar
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/”, line 32, in
import matplotlib.artist as martist
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/”, line 12, in
from .transforms import Bbox, IdentityTransform, TransformedBbox,
File “/apps/qiime/1.9.1/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/”, line 39, in
from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox,
ImportError: dynamic module does not define module export function (PyInit__path)

Hi @Shakuntla_Gondalia!
I haven’t seen this error message before, so this is a bit of a long shot, but here goes.

It looks like python 2.7 is getting pulled in here, while QIIME 2 needs v3.6. This may be QIIME 1’s fault. Is QIIME 1 installed in your 2020.2 environment, by any chance? Or maybe it’s installed globally, and is interfering?

Chris :frog:


Hi @ChrisKeefe ,

Yes it has QIIME1.9.1 installed and set as default in global environment. When I am loading QIIME2020.2 to create local environment it having QIIME 1.9.1 as well. I am not sure how this can be changed, any suggestions?


@Shakuntla_Gondalia, can share the results of the env command with us (both before and after activating your QIIME 2 conda environment) so we can take a look?

Depending on how things are configured, we may be able to suggest adjustments that will allow you to keep both pieces of software active and working properly.

Hi @ChrisKeefe, its was an issue of having older version of QIIME in the environment. Once is was unloaded the command worked just fine.

Glad to hear you got this all sorted out, @Shakuntla_Gondalia!

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