Linux conda installation issue

I’ve followed the guide to install qiime2 via conda (my conda is up-to-date at version 4.5.8)

conda env create -n qiime2-2018.6 --file qiime2-2018.6-py35-linux-conda.yml

At the end of creating new environment, I get the following error:

Preparing transaction: done
Verifying transaction: done
Executing transaction: / dbus post-link :: /etc/machine-id not found ..
dbus post-link :: .. using /proc/sys/kernel/random/boot_id

/ Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK

Traceback (most recent call last):
  File "/home/bah29/packages/anaconda3/envs/qiime2/bin/pip", line 6, in <module>
AttributeError: module 'pip' has no attribute 'main'

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/bah29/packages/anaconda3/lib/python3.6/site-packages/conda/", line 819, in __call__
        return func(*args, **kwargs)
      File "/home/bah29/packages/anaconda3/lib/python3.6/site-packages/conda_env/cli/", line 74, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/home/bah29/packages/anaconda3/lib/python3.6/site-packages/conda_env/cli/", line 108, in execute
        installer.install(prefix, pkg_specs, args, env)
      File "/home/bah29/packages/anaconda3/lib/python3.6/site-packages/conda_env/installers/", line 40, in _pip_install_via_requirements
        args, pip_version = pip_args(prefix)
      File "/home/bah29/packages/anaconda3/lib/python3.6/site-packages/conda_env/", line 33, in pip_args
        pip_version = subprocess.check_output(ret + ['-V']).decode('utf-8').split()[1]
      File "/home/bah29/packages/anaconda3/lib/python3.6/", line 336, in check_output
      File "/home/bah29/packages/anaconda3/lib/python3.6/", line 418, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['/home/bah29/packages/anaconda3/envs/qiime2/bin/python', '/home/bah29/packages/anaconda3/envs/qiime2/bin/pip', '-V']' returned non-zero exit status 1.

`$ /home/bah29/packages/anaconda3/bin/conda-env create -n qiime2 --file qiime2-2018.6-py35-linux-conda.yml.1`

Hi @MarkH!

I’m unfortunately not able to reproduce this issue on my linux machine, but I’m hoping this is just a transient issue. Let’s try the following:

rm -r /home/bah29/packages/anaconda3/envs/qiime2/
rm -r /home/bah29/packages/anaconda3/envs/qiime2-2018.6/

This will force the removal of the conda environments. It looks like you probably ran into a “environment already exists” error, but conda didn’t let you use conda env remove (since it’s a broken environment). The above should square everything up.

Next let’s clean the cache:

conda clean --all -y

Then, try re-installing again.

Let me know if anything looks strange in the output. Thanks!

I should have clarified that I have run the aforementioned two steps for removing conda envs and clearing cache, and trying another install of conda env.
Unfortunately, this has been meet with the same error in my original post.

Replying to my own question with the solution.

From what I understand, issue was caused by my bash_profiles as I had manually exported PYTHONPATH as displayed below:

export PYTHONPATH=$PYTHONPATH:/home/bah29/packages/lib/python2.7/site-packages
export PYTHONPATH=$PYTHONPATH:/home/bah29/packages/lib/python3.7/site-packages
export PYTHONPATH=$PYTHONPATH:/home/bah29/packages/anaconda3/envs/super-focus/lib/python2.7/site-packages
export PYTHONPATH=$PYTHONPATH:/home/bah29/packages/anaconda3/lib/python3.6/site-packages

Solution: simply commenting out (by adding # at the begining of the line) the PYTHONPATH lines allowed a successful creation of new qiime2 conda env.


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