New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'pandas.core.computation' has no attribute 'expressions' #18355

Closed
dheer1206 opened this Issue Nov 18, 2017 · 5 comments

Comments

Projects
None yet
5 participants
@dheer1206
Copy link

dheer1206 commented Nov 18, 2017

When Importing Keras using the command "import keras" , I'm getting the Following error

//Error
"""

Using TensorFlow backend.
Traceback (most recent call last):
File "", line 1, in
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/keras/init.py", line 4, in
from . import activations
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/keras/activations.py", line 6, in
from .engine import Layer
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/keras/engine/init.py", line 8, in
from .training import Model
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/keras/engine/training.py", line 25, in
from .. import callbacks as cbks
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/keras/callbacks.py", line 26, in
from tensorflow.contrib.tensorboard.plugins import projector
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/init.py", line 31, in
from tensorflow.contrib import factorization
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/factorization/init.py", line 24, in
from tensorflow.contrib.factorization.python.ops.gmm import *
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/factorization/python/ops/gmm.py", line 27, in
from tensorflow.contrib.learn.python.learn.estimators import estimator
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/init.py", line 88, in
from tensorflow.contrib.learn.python.learn import *
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/init.py", line 23, in
from tensorflow.contrib.learn.python.learn import *
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/init.py", line 25, in
from tensorflow.contrib.learn.python.learn import estimators
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/init.py", line 297, in
from tensorflow.contrib.learn.python.learn.estimators.dnn import DNNClassifier
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn.py", line 30, in
from tensorflow.contrib.learn.python.learn.estimators import dnn_linear_combined
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py", line 31, in
from tensorflow.contrib.learn.python.learn.estimators import estimator
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 49, in
from tensorflow.contrib.learn.python.learn.learn_io import data_feeder
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_io/init.py", line 21, in
from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py", line 26, in
import dask.dataframe as dd
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/dask/dataframe/init.py", line 3, in
from .core import (DataFrame, Series, Index, _Frame, map_partitions,
File "/home/dheer1206/anaconda3/lib/python3.6/site-packages/dask/dataframe/core.py", line 40, in
pd.core.computation.expressions.set_use_numexpr(False)
AttributeError: module 'pandas.core.computation' has no attribute 'expressions'

"""
///

TensorFlow Version - 1.3.0
Pandas Version - 0.21.0
Dask Version - 0.15.2

@TomAugspurger

This comment has been minimized.

Copy link
Contributor

TomAugspurger commented Nov 18, 2017

If you update your version of dask to >= 0.15.3, things should be all good.

@TomAugspurger TomAugspurger added this to the No action milestone Nov 18, 2017

@monajalal

This comment has been minimized.

Copy link

monajalal commented Apr 8, 2018

My dask is 0.15.3 and I get this error!!

jalal@goku pose-tensorflow]$ TF_CUDNN_USE_AUTOTUNE=0 python demo/demo_multiperson.py
/scratch/sjn/anaconda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
/scratch/sjn/anaconda/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "demo/demo_multiperson.py", line 12, in <module>
    from nnet import predict
  File "demo/../nnet/predict.py", line 5, in <module>
    from nnet.net_factory import pose_net
  File "demo/../nnet/net_factory.py", line 1, in <module>
    from nnet.pose_net import PoseNet
  File "demo/../nnet/pose_net.py", line 4, in <module>
    import tensorflow.contrib.slim as slim
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/contrib/__init__.py", line 31, in <module>
    from tensorflow.contrib import distributions
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/contrib/distributions/__init__.py", line 33, in <module>
    from tensorflow.contrib.distributions.python.ops.estimator import *
  File "/scratch/sjn/anaconda/lib/python3.6/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 "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/__init__.py", line 92, in <module>
    from tensorflow.contrib.learn.python.learn import *
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/__init__.py", line 23, in <module>
    from tensorflow.contrib.learn.python.learn import *
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 25, in <module>
    from tensorflow.contrib.learn.python.learn import estimators
  File "/scratch/sjn/anaconda/lib/python3.6/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 "/scratch/sjn/anaconda/lib/python3.6/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 "/scratch/sjn/anaconda/lib/python3.6/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 "/scratch/sjn/anaconda/lib/python3.6/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 "/scratch/sjn/anaconda/lib/python3.6/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 "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py", line 26, in <module>
    import dask.dataframe as dd
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/dask/dataframe/__init__.py", line 3, in <module>
    from .core import (DataFrame, Series, Index, _Frame, map_partitions,
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/dask/dataframe/core.py", line 40, in <module>
    pd.core.computation.expressions.set_use_numexpr(False)
AttributeError: module 'pandas.core.computation' has no attribute 'expressions'
[jalal@goku pose-tensorflow]$ conda list dask
# packages in environment at /scratch/sjn/anaconda:
#
dask                      0.15.3           py36hdc2c8aa_0  
dask-core                 0.15.3           py36h10e6167_0  
@monajalal

This comment has been minimized.

Copy link

monajalal commented Apr 8, 2018

this solved the issue
pip install dask --upgrade

@AndrewYinLi

This comment has been minimized.

Copy link

AndrewYinLi commented Jul 27, 2018

Completely forgot to load the Anaconda module I was using.
I am still experiencing this issue despite upgrading dask to the latest version!

@nathdipankar

This comment has been minimized.

Copy link

nathdipankar commented Sep 8, 2018

Updating dask did help, I am using tensorflow 1.10 and upgraded dask to 1.9.0. I was facing similar issues while using tensorflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment