问题描述
Python脚本包含import numpy、tensorflow
却报错:AttributeError: module 'pandas' has no attribute 'computation'
File "D:\IT\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\learn_io\__init__.py", line 26, in <module>
from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data
File "D:\IT\Anaconda3\lib\site-packages\tensorflow\contrib\learn\python\learn\learn_io\dask_io.py", line 33, in <module>
import dask.dataframe as dd
File "D:\IT\Anaconda3\lib\site-packages\dask\dataframe\__init__.py", line 3, in <module>
from .core import (DataFrame, Series, Index, _Frame, map_partitions,
File "D:\IT\Anaconda3\lib\site-packages\dask\dataframe\core.py", line 36, in <module>
pd.computation.expressions.set_use_numexpr(False)
AttributeError: module 'pandas' has no attribute 'computation'
解决方法
先试了pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas==0.22.0,没什么用
正确的解决方式:
因为报错中有import dask.dataframe as dd
pip install --upgrade dask