Import _tkinter In Google Cloudplatforms
In my python application i am using the matplotlib.when i start running it throws me an error: ImportError: No named '_tkinter', please install the python3-tk package Then i have
Solution 1:
Use
matplotlib.use('agg')
right after importing matplotlib, to render matplotlib graphics in a headless environment. You can also set this as the default in your matplotlibrc
file, or via the MPLBACKEND
environment variable.
See the matplotlib docs for more details: https://matplotlib.org/faq/usage_faq.html#what-is-a-backend See also the page on using matplotlib in a web application.
Post a Comment for "Import _tkinter In Google Cloudplatforms"