运行以下代码时

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相关推荐

  1. ValueError: module functions cannot set METH_CLASS or METH_STATIC 的快速处理方法

    今天在运行代码的时候遇到了如下的错误提示: Traceback (most recent call last):...File "/home/joh/.local/lib/python3.6 ...

  2. PyTorch导入报错:ValueError: module functions cannot set METH_CLASS or METH_STATIC

    导入torch时报错: >>> import torch Traceback (most recent call last):File "<stdin>&quo ...

  3. 成功解决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 ...

  4. 成功解决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 ...

  5. 解决No module named 'sklearn.cross_validation'

    解决No module named 'sklearn.cross_validation' sklearn中已经废弃cross_validation,将其中的内容整合到model_selection中 ...

  6. 成功解决ValueError: Data is not binary and pos_label is not specified

    成功解决ValueError: Data is not binary and pos_label is not specified 目录 解决问题 解决思路 解决方法 解决问题 raise Value ...

  7. 成功解决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 ...

  8. 成功解决 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 ...

  9. 成功解决AttributeError: module ‘dask.array.numpy_compat‘ has no attribute ‘take_along_axis‘

    成功解决AttributeError: module 'dask.array.numpy_compat' has no attribute 'take_along_axis' 目录 解决问题 解决思路 ...

最新文章

  1. 介绍一个很好用的Rsa加解密的.Net库 Kalix.ApiCrypto
  2. 用url传值,如何传多个值
  3. C/C++中涉及存储方式的关键字:auto,static,register,extern2009-01-22 11:23auto关键字:
  4. 让知识与经验成为你宝贵的财富
  5. bzoj5039:[Jsoi2014]序列维护
  6. vue-cli webpack 引入jquery
  7. linux 搭建日志服务器
  8. 监听短信增删以及短信会话增删
  9. 关于echart 图表自适应问题的解决办法
  10. 【方向盘】“江郎才尽”的周杰伦,出道已21周年
  11. Docker-Cgroup 资源配置方法
  12. 智慧旅游监管平台建设方案
  13. gradle下载很慢的解决方式
  14. Android系统中的常用时间戳及时间单位
  15. 在无任何报错的情况下 pagehelper.startpage分页无效问题
  16. python安装random_如何安装python randon
  17. 中国最黑的十三个旅游景点
  18. android触摸屏idc,android4.0 触摸屏配置
  19. Auto CAD设置标注尺寸格式的方法
  20. 不驰于空想,不骛于虚声

热门文章

  1. Linux查网卡驱动版本,centos查看系统版本,网卡驱动和版本信息。
  2. visual basic VB.NET实例系列教程第一节(简单实用抽奖程序)
  3. 年轻的战场--(抢了一个大沙发,老衲笑而不语,哈哈。。)
  4. android之使用QQ互联实现qq账号登录App
  5. 【极客日常】解决UE4中FJsonObject转USTRUCT的坑
  6. 看完就懂——MySQL备份与恢复
  7. a标签带参页面跳转并在跳转页面接收参数
  8. 关于POJO 即DO/DTO/BO/VO/AO说明
  9. vs code文件的打开和运行
  10. 常用缓存淘汰策略FIFO、LFU、LRU