0

Please assist me in resolving this issue, I am a beginner in TF, it might be a silly mistake I am doing here - I am getting below error while executing these two lines :

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

Error:

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

1 Answer 1

1

Judging by this GitHub issue, you're using an outdated version of dask.

If you're using Anaconda, run conda update dask, otherwise run pip install dask --upgrade to upgrade to the latest dask version available. This should fix the pandas error.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot GPhio!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.