Traceback (most recent call last):


 "<stdin>", line 1, in <module>
AttributeError: module 'torchvision' has no attribute '__version__'

Traceback (most recent call last):


 "E:/项目实验/实验工程/tensor2tensor-1.15.7/tensor2tensor/bin/t2t_datagen.py", line 39, in <module>

from tensor2tensor import problems as problems_lib
# pylint: disable=unused-import


 "E:\项目实验\实验工程\tensor2tensor-1.15.7\tensor2tensor\problems.py", line 22, in <module>

from tensor2tensor.utils import registry


 "E:\项目实验\实验工程\tensor2tensor-1.15.7\tensor2tensor\utils\registry.py", line 72, in <module>

import tensorflow.compat.v1 as tf


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow\__init__.py", line 101, in <module>

from tensorflow_core import *


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\__init__.py", line 46, in <module>

from . _api.v2 import compat


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\__init__.py", line 39, in <module>

from . import v1


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\v1\__init__.py", line 32, in <module>

from . import compat


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\__init__.py", line 39, in <module>

from . import v1


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\v1\__init__.py", line 29, in <module>

from tensorflow._api.v2.compat.v1 import app


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\__init__.py", line 39, in <module>

from . import v1


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\v1\__init__.py", line 32, in <module>

from . import compat


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\__init__.py", line 39, in <module>

from . import v1


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_core\_api\v2\compat\v1\compat\v1\__init__.py", line 667, in <module>

from tensorflow_estimator.python.estimator.api._v1 import estimator


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_estimator\__init__.py", line 10, in <module>

from tensorflow_estimator._api.v1 import estimator


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_estimator\_api\v1\estimator\__init__.py", line 10, in <module>

from tensorflow_estimator._api.v1.estimator import experimental


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_estimator\_api\v1\estimator\experimental\__init__.py", line 10, in <module>

from tensorflow_estimator.python.estimator.canned.dnn import dnn_logit_fn_builder


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_estimator\python\estimator\canned\dnn.py", line 33, in <module>

from tensorflow_estimator.python.estimator import estimator


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_estimator\python\estimator\estimator.py", line 53, in <module>

from tensorflow_estimator.python.estimator import util as estimator_util


 "D:\softInstallWay\Anaconda\envs\tf21\lib\site-packages\tensorflow_estimator\python\estimator\util.py", line 75, in <module>

class _DatasetInitializerHook(tf.compat.v1.train.SessionRunHook):
AttributeError: **module 'tensorflow' has no attribute 'compat'**
