Tensorflow-从MNIST_数据获取数据_集时出错

Tensorflow-从MNIST_数据获取数据_集时出错,tensorflow,Tensorflow,请帮助我解决这个问题,我是TF的初学者,这可能是我在这里犯的一个愚蠢的错误- 在执行这两行时,我遇到以下错误: from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) 错误: Traceback (most recent call last): File "/home/rishabh/PycharmPro

请帮助我解决这个问题,我是TF的初学者,这可能是我在这里犯的一个愚蠢的错误- 在执行这两行时,我遇到以下错误:

from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
错误:

Traceback (most recent call last):
  File "/home/rishabh/PycharmProjects/TF/ReadDatasetFromMNIST.py", line 1, in <module>
    from tensorflow.examples.tutorials.mnist import input_data
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/examples/tutorials/mnist/__init__.py", line 21, in <module>
    from tensorflow.examples.tutorials.mnist import input_data
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/examples/tutorials/mnist/input_data.py", line 29, in <module>
    from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/__init__.py", line 31, in <module>
    from tensorflow.contrib import distributions
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/distributions/__init__.py", line 33, in <module>
    from tensorflow.contrib.distributions.python.ops.estimator import *
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/distributions/python/ops/estimator.py", line 21, in <module>
    from tensorflow.contrib.learn.python.learn.estimators.head import _compute_weighted_loss
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/__init__.py", line 92, in <module>
    from tensorflow.contrib.learn.python.learn import *
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/__init__.py", line 23, in <module>
    from tensorflow.contrib.learn.python.learn import *
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 25, in <module>
    from tensorflow.contrib.learn.python.learn import estimators
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/__init__.py", line 297, in <module>
    from tensorflow.contrib.learn.python.learn.estimators.dnn import DNNClassifier
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn.py", line 30, in <module>
    from tensorflow.contrib.learn.python.learn.estimators import dnn_linear_combined
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py", line 31, in <module>
    from tensorflow.contrib.learn.python.learn.estimators import estimator
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 49, in <module>
    from tensorflow.contrib.learn.python.learn.learn_io import data_feeder
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/learn_io/__init__.py", line 21, in <module>
    from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data
  File "/home/rishabh/.local/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py", line 26, in <module>
    import dask.dataframe as dd
  File "/home/rishabh/anaconda3/lib/python3.5/site-packages/dask/dataframe/__init__.py", line 3, in <module>
    from .core import (DataFrame, Series, Index, _Frame, map_partitions,
  File "/home/rishabh/anaconda3/lib/python3.5/site-packages/dask/dataframe/core.py", line 36, in <module>
    pd.computation.expressions.set_use_numexpr(False)
AttributeError: module 'pandas' has no attribute 'computation'

Process finished with exit code 1
根据你的判断,你使用的是过时的dask版本


如果您使用的是Anaconda,请运行conda update dask,否则请运行pip install dask-upgrade升级到可用的最新dask版本。这将修复熊猫错误。

非常感谢GPhio!