Open fedarko opened 4 years ago
I'm actually having some trouble reproducing this issue - I was able to install songbird in a qiime2-2020.2 environment without the seeing the qiime dev refresh-cache
errors you ran into.
But agree with the pip install
recommendation - thank you for pushing that PR in.
I suspect that you have both versions of opt[_-]einsum
installed -- I had the same thing happen to me, it worked the first time in a "old" Q2 2020.2 environment that I'd been using for a while, but when I installed a new Q2 2020.2 environment and then immediately tried to install Songbird I got the error.
If my hypothesis is correct :), I think running conda list | grep einsum
in your environment should show two packages... if this isn't the case, then you may have figured out a way past this issue, so that's also useful ;)
In a vanilla Q2.2020.2 environment, the songbird install only worked with python -m pip install songbird
; whereas pip install songbird
gives: _ModuleNotFoundError: No module named 'pip._internal'.
Thought this could help others
Hi @Alxdu thanks for reporting this issue. I'm having trouble producing this issue as well. Do you have pip installed? You can verify with which pip
.
It is also worthwhile conda-forge install via conda install songbird -c conda-forge
if there are issues with pip.
I've only seen the issue in the conda environment created by the default qiime2-2020.2 install.
which pip
/home/user/miniconda3/envs/qiime2-2020.2/bin/pip
conda list
pip 20.0.2 py_2 conda-forge
I haven't tried a standalone songbird install. But like I mentioned, running python -m pip install songbird
in the qiime env works well. I was able to run through the demo RedSea data. No issues to report after installation.
Side note: the same installation process worked on a windows machine within Windows Subsystem for Linux (Ubuntu 20.04). Works well in Windows.
Ok, I'm able to reproduce these issues.
FYI : not sure if the pip install will work if you want to get the qiime commands in qiime2-2020.6
.
The current workaround is to run
conda install tensorflow==1.15
conda install songbird -c conda-forge
A fix to the songbird conda-forge recipe will be coming up soon (I hope).
So, installing Songbird via conda-forge into a fresh QIIME 2 2020.2 environment now works, at least insofar as getting Songbird installed. (Like, importing Songbird into python works, running
songbird multinomial --help
works, ...)However, when you run
qiime dev refresh-cache
, the following error rears its head:For reference,
opt_einsum
is a dependency of TensorFlow. The funky thing is that this library actually is getting installed when you install Songbird via conda-forge: see this Qurro Travis build log for an example (just ctrl-C foreinsum
).But here's the kicker.
opt_einsum
is getting installed, but TensorFlow is exploding because it expectsopt-einsum
to be installed. Yeah, apparently the hyphen (-
) vs. underscore (_
) actually separates two different "packages", at least from conda-forge's perspective (hyphen, underscore).The "underscore" version (
opt_einsum
) is apparently the actively maintained version of this package, but the "hyphen" version (opt-einsum
) actually works with TensorFlow (it seems like QIIME 2 is checking the currently-installed package versions against TensorFlow'ssetup.py
or something, and thesetup.py
hasn't been updated to point toopt_einsum
instead ofopt-einsum
yet).A solution (documented by some brave souls who have also run into this problem) corroborates that we can get around this by literally adding a requirement for
opt-einsum
to the conda-forge recipe. (Similarly, runningconda install -c conda-forge opt-einsum
after conda-installing songbird fixes the QIIME 2 errors. The downside seems to be that now there are twoopt[-_]einsum
packages installed in the conda environment, which is probably pretty confusing for everyone involved.)So, there are a few ways around this (updating the songbird recipe, updating the songbird readme, raising this issue with the tensorflow conda-forge maintainers, just asking users to
pip install songbird
for the time being, ...) -- hopefully getting around this shouldn't be too bad.