pkg_resources.VersionConflict Tensorflow-Songbird

Hi,
I finished successfully the tutorial on “Moving Pictures”.
Then I installed Songbird https://github.com/biocore/songbird and since then I get the following error message and qiime does not work anymore:
pkg_resources.VersionConflict: (tensorflow 1.15.0 (/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages), Requirement.parse(‘tensorflow<2,>=1.15.2’))

who can help??

all the best

Hi @rotifer!

Sounds like something went wrong with the installation of songbird. All you need to do is follow the installation instructions for QIIME 2 again (you can start with creating the conda env): it should go very fast since you have already installed this version of QIIME 2 once before, so you should have all these packages in your cache.

:qiime2:

I followed your advice but qiime does not work anymore …
I did:

conda create -n songbird_env songbird "pandas>=0.18.0,<1" -c conda-forge

I copy and paste some important/interesting pieces:

Remove existing environment (y/[n])? y
==> WARNING: A newer version of conda exists. <==
  current version: 4.8.2
  latest version: 4.8.3

tensorboard        conda-forge/osx-64::tensorboard-1.15.0-py37_0
  tensorflow         pkgs/main/osx-64::tensorflow-1.15.0-mkl_py37hb249377_0
  tensorflow-base    pkgs/main/osx-64::tensorflow-base-1.15.0-mkl_py37h032239d_0
  tensorflow-estima~ pkgs/main/noarch::tensorflow-estimator-1.15.1-pyh2649769_0

Proceed ([y]/n)? y


Downloading and Extracting Packages
pandas-0.25.3        | 10.3 MB   | ################################################################################################################################################## | 100% 
importlib_metadata-1 | 3 KB      | ################################################################################################################################################## | 100% 
tensorflow-base-1.15 | 75.8 MB   | ################################################################################################################################################## | 100% 
songbird-1.0.2       | 27 KB     | ################################################################################################################################################## | 100% 
setuptools-46.1.3    | 636 KB    | ################################################################################################################################################## | 100% 
tensorflow-1.15.0    | 4 KB      | ################################################################################################################################################## | 100% 
importlib-metadata-1 | 42 KB     | ################################################################################################################################################## | 100% 
wcwidth-0.1.9        | 20 KB     | ################################################################################################################################################## | 100% 
prompt-toolkit-3.0.5 | 232 KB    | ################################################################################################################################################## | 100% 
numpy-1.18.1         | 5.1 MB    | ################################################################################################################################################## | 100% 
tensorboard-1.15.0   | 3.8 MB    | ################################################################################################################################################## | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

then I did:

conda activate songbird_env

conda activate qiime2-2020.2

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 "/Users/uli/miniconda3/envs/qiime2-2020.2/bin/qiime", line 11, in <module>
    sys.exit(qiime())
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 716, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 641, in make_context
    self.parse_args(ctx, args)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/click/command.py", line 43, in parse_args
    return super().parse_args(ctx, args)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 1086, in parse_args
    echo(ctx.get_help(), color=ctx.color)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 516, in get_help
    return self.command.get_help(self)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 879, in get_help
    self.format_help(ctx, formatter)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/click/core.py", line 898, in format_help
    self.format_options(ctx, formatter)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/click/command.py", line 157, in format_options
    for subcommand in self.list_commands(ctx):
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 92, in list_commands
    plugins = sorted(self._plugin_lookup)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 76, in _plugin_lookup
    import q2cli.core.cache
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 404, in <module>
    CACHE = DeploymentCache()
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 61, in __init__
    self._state = self._get_cached_state(refresh=refresh)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 107, in _get_cached_state
    self._cache_current_state(current_requirements)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 200, in _cache_current_state
    state = self._get_current_state()
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/core/cache.py", line 238, in _get_current_state
    plugin_manager = qiime2.sdk.PluginManager()
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 54, in __new__
    self._init(add_plugins=add_plugins)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 81, in _init
    plugin = entry_point.load()
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2444, in load
    self.require(*args, **kwargs)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2467, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/pkg_resources/__init__.py", line 792, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (tensorflow 1.15.0 (/Users/uli/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages), Requirement.parse('tensorflow<2,>=1.15.2'))
(qiime2-2020.2) Ulis-MacBook-Pro:redsea uli$

Looks like you have a bit of a mess on your hands: first off, I don't see where you actually reinstalled QIIME 2 again - did you do that? I would recommend just removing all of the broken conda envs with

conda env remove -n $NAME

where $NAME is the name of the broken conda env.

Then, before you do anything else, make sure that your base env is clean by running conda list in it - there should not be any packages like tensorflow or scikit-learn in your root env - this will cause you all kinds of heartache. Once you sort out your base env, then go back to reinstalling QIIME 2 (not songbird, just the base QIIME 2 environment):

https://docs.qiime2.org/2020.2/install/native/

:qiime2:

PS -

This bit, where you activate an environment within an environment, will always lead to sadness and suffering. I strongly encourage you to just use one environment at a time! They are practically disposable, and quick and easy to make, it'll make your life so much easier.

1 Like

I am happy to tell you that qiime works again :o)
I would like to work with Songbird

conda install songbird -c conda-forge

Next, run the following command to get QIIME 2 to “recognize” Songbird:

qiime dev refresh-cache

I still have songbird_env

how should I proceed now?

A post was split to a new topic: Help with installing songbird

Hi @rotifer,

It looks like the original error you got was my fault – we’ve been having some problems with Songbird on conda recently.

We’re currently working on a fix to the conda-forge installation of Songbird, but in the meantime you should be able to install Songbird through pip: just run the following commands while in a QIIME 2 conda environment –

pip install songbird
qiime dev refresh-cache
qiime info

Let me know how this works for you! If you run into problems, you may need to run conda uninstall songbird first.

2 Likes

hurrah, it worked!!!
many thanks for your kind help

1 Like

Great! thanks Fedarko, it solved our problem with Songbird as well.

2 Likes

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