词云问题
python3中imread被弃用,这应该怎么修改啊求指教 from PIL import Image# 另外一个模块
#Read image
im = Image.open( 'image.jpg' )
试试?
吓得我以为真的弃用了。。。
你从哪听说的。。。 Charles未晞 发表于 2018-8-21 19:47
吓得我以为真的弃用了。。。
你从哪听说的。。。
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) on win32
Type "copyright", "credits" or "license()" for more information.
>>>
=============== RESTART: D:\learn\python\execise\1.6........py ===============
Warning (from warnings module):
File "D:\learn\python\execise\1.6........py", line 4
image=imread("123.jpg")
DeprecationWarning: `imread` is deprecated!
`imread` is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
Use ``imageio.imread`` instead.
Traceback (most recent call last):
File "D:\learn\python\execise\1.6........py", line 4, in <module>
image=imread("123.jpg")
File "D:\learn\python\python3.6.0\lib\site-packages\numpy\lib\utils.py", line 101, in newfunc
return func(*args, **kwds)
File "D:\learn\python\python3.6.0\lib\site-packages\scipy\misc\pilutil.py", line 164, in imread
im = Image.open(name)
File "D:\learn\python\python3.6.0\lib\site-packages\PIL\Image.py", line 2580, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: No such file or directory: '123.jpg'
>>> claws0n 发表于 2018-8-21 12:52
from PIL import Image# 另外一个模块
#Read image
im = Image.open( 'image.jpg' )
================== RESTART: D:\learn\python\execise\1.9.py ==================
Traceback (most recent call last):
File "D:\learn\python\execise\1.9.py", line 69, in <module>
paddle=Paddle(self,canvas,'blue')
NameError: name 'self' is not defined
页:
[1]