Activation error with h5py

I installed miniconda 3 and then Qiime2 without problems, however when I try to run qiime2 with the command:

conda activate qiime2-2021.8

I get this error:

ImportError: cannot import name '_errors' from partially initialized module 'h5py' (most likely due to a circular import) (/opt/apps/intel19/impi19_0/python3/3.7.0/lib/python3.7/site-packages/h5py/

Can anyone advise? Should I try another version of python? I am using 3.9 currently.

Thank you,

Keir Macartney

Hi @kjm1049!

This error is actually an indication that either your PATH or PYTHONPATH env vars are configured in a way that is causing all kinds of "mixing" of your isolated python environments. In particular, I see that the error is referencing a Python 3.7 deployment, however QIIME 2 ships in a Python 3.8 environment.

Go ahead and run env, then copy and paste the results here and we can lend a hand.


Awesome thank you! I ran env but got quite a lot of output so I piped it into a text file. Please let me know if you need anything else.

kjm1049_env_output.txt (25.7 KB)

Hi @kjm1049!

The offending env var is here:


Take a look at the conda FAQ for some details on why PYTHONPATH cannot be set inside an active conda env:

Managed to sort the issue! Thank you very much!

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