首页 > 解决方案 > 如何修复 Python 3.7 中“scipy.misc”中“bytescale”的导入错误?

问题描述

我已经bytescale在我的 python 3.6 中使用了。代码,这它的解释。Scipybased on安装后导入没有问题,但是在( )Anaconda之后出现导入错误from scipy.misc import bytescale

所以,

import scipy.io as sio  # without any error

from scipy.misc import bytescale # with an error.

错误:

 ImportError: cannot import name 'bytescale' from 'scipy.misc'

还,

Version of Python is 3.7, Windows 10

scipy                     1.3.1            py37h29ff71c_0    anaconda

pillow                    6.1.0            py37hdc69c19_0

然后,我发现“ bytescaleis deprecated! bytescaleis deprecated in SciPy 1.0.0,and will be removed in 1.2.0”。现在,我需要一个可以bytescale在 Python 3.7 中工作的函数。

Python 3.7中是否有诸如“bytescale”之类的功能?

标签: pythonscipy

解决方案


推荐阅读