admin管理员组文章数量:1401384
For multiple image analysis projects in python, I keep getting these two errors below:
Error 1: Python[19607:217577] +[IMKClient subclass]: chose IMKClient_Legacy Error 2: Python[19607:217577] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
I want to use mac, and have tried using jupyter notebook, pycharm, and python in terminal to work around it.
Below is one example of program that gives such error (other programs I have also give such errors).
from skimage.io import imread
import matplotlib.pyplot as plt
f = imread('house.png', as_gray=True)
imgplot = plt.imshow(f)
plt.show()
For multiple image analysis projects in python, I keep getting these two errors below:
Error 1: Python[19607:217577] +[IMKClient subclass]: chose IMKClient_Legacy Error 2: Python[19607:217577] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
I want to use mac, and have tried using jupyter notebook, pycharm, and python in terminal to work around it.
Below is one example of program that gives such error (other programs I have also give such errors).
from skimage.io import imread
import matplotlib.pyplot as plt
f = imread('house.png', as_gray=True)
imgplot = plt.imshow(f)
plt.show()
Share
Improve this question
edited Apr 3 at 10:37
Christoph Rackwitz
15.8k5 gold badges39 silver badges51 bronze badges
asked Mar 24 at 12:25
Gad11ngGad11ng
231 silver badge6 bronze badges
4
|
1 Answer
Reset to default 0Someone on reddit found this working solution, it is a backend problem on some Macs (source https://www.reddit/r/learnpython/comments/1jnz2wf/mac_error_when_doing_image_analysis/):
import matplotlib
import matplotlib.pyplot as plt
from skimage.io import imread
matplotlib.use('TkAgg')
f = imread('house.png', as_gray=True)
plt.imshow(f)
本文标签:
版权声明:本文标题:ios - For image analysis on mac, how do I prevent this error: Python[19607:217577] +[IMKInputSession subclass]: chose IMKInputSe 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744252473a2597315.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
imread()
at least twice here in your shared Python script code. Do you need one or both to give the issue? And in that vein, posting the full traceback that comes from exactly code you are sharing would also probably help in general. What line is causing the error is not apparent from the little you have provided? Why is this tagged with 'Mobile Develpment Collective'? – Wayne Commented Mar 24 at 15:25