biocore / songbird

Vanilla regression methods for microbiome differential abundance analysis
BSD 3-Clause "New" or "Revised" License
54 stars 25 forks source link

README installation instructions don't seem to work #154

Open wasade opened 3 years ago

wasade commented 3 years ago

I followed the installation instructions for creating a stand alone conda environment but was met with:

Traceback (most recent call last):
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/bin/songbird", line 8, in <module>
    from songbird.multinomial import MultRegression
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/songbird/multinomial.py", line 3, in <module>
    from tensorflow.contrib.distributions import Multinomial, Normal
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/__init__.py", line 39, in <module>
    from tensorflow.contrib import compiler
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/compiler/__init__.py", line 21, in <module>
    from tensorflow.contrib.compiler import jit
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/compiler/__init__.py", line 22, in <module>
    from tensorflow.contrib.compiler import xla
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/contrib/compiler/xla.py", line 22, in <module>
    from tensorflow.python.estimator import model_fn as model_fn_lib
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_core/python/estimator/model_fn.py", line 26, in <module>
    from tensorflow_estimator.python.estimator import model_fn
  File "/Users/dtmcdonald/miniconda3/envs/songbird_env/lib/python3.7/site-packages/tensorflow_estimator/python/estimator/model_fn.py", line 29, in <module>
    from tensorflow.python.types import core
ModuleNotFoundError: No module named 'tensorflow.python.types'

I then tried to install tensorflow effectively as described in the CI configuration, (e.g. conda install "tensorflow >=1.15,<2") but the error did not change.

mortonjt commented 3 years ago

hmm, that is so weird. I'm not able to reproduce this error with conda install songbird -c conda-forge. What install command did you use? And can you provide your tensorflow version (i.e. python -c 'import tensorflow; tensorflow.__version__')? And are you getting similar errors with pip install tensorflow<2; pip install songbird?

wasade commented 3 years ago

Thanks, @mortonjt! I ran the commands from the link below:

https://github.com/biocore/songbird#installation

...and then looked at .travis.yml to see how tensorflow was installed. Despite a successful execution of conda install "tensorflow >=1.15,<2", it seems that tensorflow was not installed. It looks like pip install "tensorflow<2 did work though

mortonjt commented 3 years ago

I still very confused why tensorflow<2 isn't conda installable ... It is clearly hosted on conda : https://anaconda.org/anaconda/tensorflow I wonder if there are some issues with the channels ...