google-research / task_adaptation

Apache License 2.0
311 stars 35 forks source link

"Could not find a version that satisfies the requirement tensorflow==1.15rc3" #4

Closed dkossnick-figma closed 4 years ago

dkossnick-figma commented 5 years ago

I cloned the repo and am going through the setup steps. I am in a fresh conda environment.

I run pip install -e . and get the results:

(task_adaptation) david@david:~/Code/task_adaptation$ pip install -e .
Obtaining file:///home/david/Code/task_adaptation
Collecting absl-py (from task-adaptation==0.1)
Collecting numpy (from task-adaptation==0.1)
  Using cached https://files.pythonhosted.org/packages/d7/b1/3367ea1f372957f97a6752ec725b87886e12af1415216feec9067e31df70/numpy-1.16.5-cp27-cp27mu-manylinux1_x86_64.whl
Collecting six (from task-adaptation==0.1)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting mock (from task-adaptation==0.1)
  Using cached https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Collecting tensorflow==1.15rc3 (from task-adaptation==0.1)
  Could not find a version that satisfies the requirement tensorflow==1.15rc3 (from task-adaptation==0.1) (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow==1.15rc3 (from task-adaptation==0.1)

This halted installation, so it never got to datasets or hub, which causes problems. As a workaround, I edited setup.py to reference tensorflow==2.0.0a0 locally and finished setup from that. Not sure if this will bite me later with API compatibility issues.

dkossnick-figma commented 5 years ago

With tensorflow==2.0.0a0, in the data folder I run python cifar_test.py and get:

(task_adaptation) david@david:~/Code/task_adaptation/task_adaptation/data$ python cifar_test.py
Traceback (most recent call last):
  File "cifar_test.py", line 21, in <module>
    from task_adaptation.data import cifar
  File "/home/david/Code/task_adaptation/task_adaptation/data/cifar.py", line 21, in <module>
    import task_adaptation.data.base as base
  File "/home/david/Code/task_adaptation/task_adaptation/data/base.py", line 25, in <module>
    import tensorflow_datasets as tfds
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/__init__.py", line 46, in <module>
    from tensorflow_datasets.core import tf_compat
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/__init__.py", line 30, in <module>
    from tensorflow_datasets.core.dataset_info import BeamMetadataDict
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/dataset_info.py", line 54, in <module>
    from tensorflow_datasets.core.features import top_level_feature
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/__init__.py", line 27, in <module>
    from tensorflow_datasets.core.features.features_dict import FeaturesDict
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/features_dict.py", line 28, in <module>
    from tensorflow_datasets.core.features import top_level_feature
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/top_level_feature.py", line 27, in <module>
    class TopLevelFeature(feature_lib.FeatureConnector):
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/features/top_level_feature.py", line 45, in TopLevelFeature
    @tf.autograph.experimental.do_not_convert()
AttributeError: 'module' object has no attribute 'do_not_convert'

With tensorflow==1.14.0, when in the data folder I run python cifar_test.py, I get:

(task_adaptation) david@david:~/Code/task_adaptation/task_adaptation/data$ python cifar_test.py
Traceback (most recent call last):
  File "cifar_test.py", line 21, in <module>
    from task_adaptation.data import cifar
  File "/home/david/Code/task_adaptation/task_adaptation/data/cifar.py", line 21, in <module>
    import task_adaptation.data.base as base
  File "/home/david/Code/task_adaptation/task_adaptation/data/base.py", line 25, in <module>
    import tensorflow_datasets as tfds
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/__init__.py", line 46, in <module>
    from tensorflow_datasets.core import tf_compat
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/__init__.py", line 21, in <module>
    tf_compat.ensure_tf_install()
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/tf_compat.py", line 66, in ensure_tf_install
    _patch_tf(tf)
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/tf_compat.py", line 80, in _patch_tf
    _patch_for_tf1_13(tf)
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow_datasets/core/tf_compat.py", line 114, in _patch_for_tf1_13
    tf.contrib.autograph.do_not_convert)
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/python/util/lazy_loader.py", line 62, in __getattr__
    module = self._load()
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/python/util/lazy_loader.py", line 45, in _load
    module = importlib.import_module(self.__name__)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/__init__.py", line 37, in <module>
    from tensorflow.contrib import cudnn_rnn
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/__init__.py", line 38, in <module>
    from tensorflow.contrib.cudnn_rnn.python.layers import *
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/__init__.py", line 23, in <module>
    from tensorflow.contrib.cudnn_rnn.python.layers.cudnn_rnn import *
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py", line 20, in <module>
    from tensorflow.contrib.cudnn_rnn.python.ops import cudnn_rnn_ops
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py", line 22, in <module>
    from tensorflow.contrib.rnn.python.ops import lstm_ops
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/rnn/__init__.py", line 93, in <module>
    from tensorflow.contrib.rnn.python.ops.rnn_cell import *
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/rnn/python/ops/rnn_cell.py", line 24, in <module>
    from tensorflow.contrib.layers.python.layers import layers
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/layers/__init__.py", line 116, in <module>
    from tensorflow.contrib.layers.python.layers import *
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/__init__.py", line 33, in <module>
    from tensorflow.contrib.layers.python.layers.target_column import *
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/target_column.py", line 24, in <module>
    from tensorflow.contrib.losses.python.losses import loss_ops
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/losses/__init__.py", line 25, in <module>
    from tensorflow.contrib.losses.python import metric_learning
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/losses/python/metric_learning/__init__.py", line 25, in <module>
    from tensorflow.contrib.losses.python.metric_learning.metric_loss_ops import *
  File "/home/david/.local/lib/python2.7/site-packages/tensorflow/contrib/losses/python/metric_learning/metric_loss_ops.py", line 34, in <module>
    from sklearn import metrics
  File "/home/david/.local/lib/python2.7/site-packages/sklearn/metrics/__init__.py", line 7, in <module>
    from .ranking import auc
  File "/home/david/.local/lib/python2.7/site-packages/sklearn/metrics/ranking.py", line 36, in <module>
    from ..preprocessing import label_binarize
  File "/home/david/.local/lib/python2.7/site-packages/sklearn/preprocessing/__init__.py", line 6, in <module>
    from ._function_transformer import FunctionTransformer
  File "/home/david/.local/lib/python2.7/site-packages/sklearn/preprocessing/_function_transformer.py", line 5, in <module>
    from ..utils.testing import assert_allclose_dense_sparse
  File "/home/david/.local/lib/python2.7/site-packages/sklearn/utils/testing.py", line 751, in <module>
    import pytest
  File "/usr/lib/python2.7/dist-packages/pytest.py", line 13, in <module>
    from _pytest.fixtures import fixture, yield_fixture
  File "/usr/lib/python2.7/dist-packages/_pytest/fixtures.py", line 842, in <module>
    class FixtureFunctionMarker(object):
  File "/usr/lib/python2.7/dist-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
    params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'

I am getting the same errors for all the tests I've tried. Any advice?

akolesnikoff commented 5 years ago

Regarding the problem with installation of tensorflow 1.15, I suspect that you are using outdated version of pip. Could you make sure that pip version you are using is 19.3.1 and try again?

akolesnikoff commented 4 years ago

Closing due inactivity.