解决ValueError: module functions cannot set METH_CLASS or METH_STATIC
运行以下代码时
import matplotlib.pyplot as plt
from keras import backend as K
遇到错误
Using TensorFlow backend.
Traceback (most recent call last):File "/home/xxx.py", line 13, in <module>from keras import backend as K
.............from pandas.util._move import (
ValueError: module functions cannot set METH_CLASS or METH_STATIC
怀疑是numpy版本或者pandas版本的问题,来回试过好多遍依据不能解决问题,最后通过查找资料发现将这两句话的位置倒换以下即可。
import keras.backend as K
import matplotlib.pyplot as plt
大家可以找到出错的语句(当前所运行的python文件的,如我的出错语句是from keras import backend as K)与它上面的语句或下面的语句倒换位置尝试一下。
解决ValueError: module functions cannot set METH_CLASS or METH_STATIC相关推荐
- ValueError: module functions cannot set METH_CLASS or METH_STATIC 的快速处理方法
今天在运行代码的时候遇到了如下的错误提示: Traceback (most recent call last):...File "/home/joh/.local/lib/python3.6 ...
- PyTorch导入报错:ValueError: module functions cannot set METH_CLASS or METH_STATIC
导入torch时报错: >>> import torch Traceback (most recent call last):File "<stdin>&quo ...
- 成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h ...
- 成功解决This module was deprecated in version 0.18 in favor of the model_selection module into which all
成功解决This module was deprecated in version 0.18 in favor of the model_selection module into which all ...
- 解决No module named 'sklearn.cross_validation'
解决No module named 'sklearn.cross_validation' sklearn中已经废弃cross_validation,将其中的内容整合到model_selection中 ...
- 成功解决ValueError: Data is not binary and pos_label is not specified
成功解决ValueError: Data is not binary and pos_label is not specified 目录 解决问题 解决思路 解决方法 解决问题 raise Value ...
- 成功解决ValueError: DataFrame.dtypes for data must be int, float or bool.Did not expect the data types
成功解决ValueError: DataFrame.dtypes for data must be int, float or bool. Did not expect the data types ...
- 成功解决 AttributeError: module ‘keras.engine.topology‘ has no attribute ‘load_weights_from_hdf5_group_b
成功解决 AttributeError: module 'keras.engine.topology' has no attribute 'load_weights_from_hdf5_group_b ...
- 成功解决AttributeError: module ‘dask.array.numpy_compat‘ has no attribute ‘take_along_axis‘
成功解决AttributeError: module 'dask.array.numpy_compat' has no attribute 'take_along_axis' 目录 解决问题 解决思路 ...
最新文章
- 介绍一个很好用的Rsa加解密的.Net库 Kalix.ApiCrypto
- 用url传值,如何传多个值
- C/C++中涉及存储方式的关键字:auto,static,register,extern2009-01-22 11:23auto关键字:
- 让知识与经验成为你宝贵的财富
- bzoj5039:[Jsoi2014]序列维护
- vue-cli webpack 引入jquery
- linux 搭建日志服务器
- 监听短信增删以及短信会话增删
- 关于echart 图表自适应问题的解决办法
- 【方向盘】“江郎才尽”的周杰伦,出道已21周年
- Docker-Cgroup 资源配置方法
- 智慧旅游监管平台建设方案
- gradle下载很慢的解决方式
- Android系统中的常用时间戳及时间单位
- 在无任何报错的情况下 pagehelper.startpage分页无效问题
- python安装random_如何安装python randon
- 中国最黑的十三个旅游景点
- android触摸屏idc,android4.0 触摸屏配置
- Auto CAD设置标注尺寸格式的方法
- 不驰于空想,不骛于虚声