DeprecationWarning
当我在导入sklearn这个库的时候,程序抛出了一个丢弃警告,它的意思是在版本更新后imp库已经不用了,用importlib来代替这个库
Warning (from warnings module):
File "C:\Users\33171\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\externals\joblib\externals\cloudpickle\cloudpickle.py", line 47
import imp
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
因此解决方案就是把它的文件路径copy下来,C:\Users\33171\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\externals\joblib\externals\cloudpickle
打开它,然后把cloudpickle.py文件里面的
import imp -->改成 import importlib
from __future__ import print_function import dis
from functools import partial
import importlib #更改之前是 import imp
import io
import itertools
import logging
import opcode
import operator
import pickle
import struct
import sys
import traceback
import types
import weakref
预览
DeprecationWarning的更多相关文章
- 解决: DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and will raise ValueError in 0.19
错误信息:C:\Python27\lib\site-packages\sklearn\utils\validation.py:395: DeprecationWarning: Passing 1d a ...
- DeprecationWarning: Calling an asynchronous function without callback is deprecated. - how to find where the “function:” is?
I recently updated my node to 7.2.1 and noticed that there is a warning coming: (node:4346) Deprecat ...
- Python提示AttributeError 或者DeprecationWarning: This module was deprecated解决方法
Python提示AttributeError 或者DeprecationWarning: This module was deprecated解决方法 在使用Python的sklearn库时,发现sk ...
- DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead extract-text-webpack-plugin 提取css报错
深入浅出Webpack 1-5 使用pulugin extract-text-webpack-plugin 提取css报错 DeprecationWarning: Tapable.plugin is ...
- 解决如下出错:DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19.
背景:在Spyder中写几行脚本,目的是应用sklearn自带的svm(支持向量机)算法,来对其自带的digits(手写体数字)数据集进行分类,过程包括训练阶段和预测阶段.将手写体数字数据的特征数据d ...
- node.js开发错误——DeprecationWarning: Mongoose: mpromise
原文地址 使用mongoose进行数据库操作时,总是提示: (node:5684) DeprecationWarning: Mongoose: mpromise (mongoose's default ...
- [未解决]报错:DeprecationWarning: decodestring() is a deprecated alias since Python 3.1, use decodebytes()
DeprecationWarning: decodestring() is a deprecated alias since Python 3.1, use decodebytes()
- mongoose报错:DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
mongoose报错:(node:15689) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes ...
- DeprecationWarning:'open()' is deprecated in mongoose>=4.11.0,use 'openUri()' instead or set the 'useMongoClient' option if using 'connect()' or 'createConnection'
mongoose.connect('mongodb://localhost/test');报错:(node:2752) DeprecationWarning: `open()` is deprecat ...
随机推荐
- VM克隆centos7虚拟机并配置网络
笔者这里有个配置好网络的centos7系统,下面将根据这个centos7克隆出一个centos7系统,并配置好网络 1.右键虚拟机克隆 2.选择创建完整克隆 3.克隆机的命名,点击完成 4.可看到这里 ...
- Mysql安装本地数据库
1.下载解压:https://dev.mysql.com/downloads/mysql/ 2.配置环境变量path: D:\workPrograms\mysql-8.0.16-winx64\bin ...
- jenkins中shell脚本编写的两个注意点
在jenkins的build中,如果用shell脚本的话,要记住有两个地方要注意 1.由于默认jenkins是使用/bin/bash -xe xxx.sh来调用脚本的,所以不同于日常写的脚本,任何一行 ...
- centos的nginx如何访问本地共享文件夹的文件 nginx访问404,403问题
关键挂载 sudo vmhgfs-fuse .host:/musings /home/xxx -o allow_other,uid=0,gid=0
- 《DSP using MATLAB》Problem 7.25
代码: %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output In ...
- hello1 hello2 代码分析
1.hello1代码分析 hello.java package javaeetutorial.hello1; import javax.enterprise.context.RequestScoped ...
- P2930 [USACO09HOL]假期绘画Holiday Painting
线段树水题,考虑到只有15列,所以我们对于每一列,我们都去维护一个线段树. 现在来考虑一下修改操作,因为每次修改的时候,我们都是将黑的改成白的,白的改成黑的,所以我们对线段树的每个节点维护当前这段区间 ...
- Linux第九节课学习笔记
fdisk可添加.删除.转换分区. 创建主分区:n-p-w:扩展分区:n-e:逻辑分区:n-l. SWAP分区专用格式化命令mkswap,专用挂载命令swapon. 磁盘容量配额中,硬限制必须,软限制 ...
- web方向编程语言最全对比
web方向编程语言最全对比 目前一般公司的后台用的开发语言大概有以下几种:java,python,php,asp.net,c++,node.js,ruby on rails 等. java 优点:性能 ...
- 芯灵思Sinlinx A64 开发板移植SQLite3
开发平台 芯灵思Sinlinx A64 内存: 1GB 存储: 4GB 开发板详细参数 https://m.tb.cn/h.3wMaSKm 开发板交流群 641395230 首先到 http://ww ...