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)
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