Import Error: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running
See original GitHub issueI’m facing import error while executing the ludwig from google colab… !!
Below is the code which I executed in steps:
-
Loading Ludwig
!pip install ludwig
-
Upload file from local to Drive - to use in Colab
from google.colab import files
uploaded = files.upload()
-
Train DataSet using ludwig cmd
!ludwig train --data_csv ludwig_traindataset_1.csv --model_definition_file model_def.yaml
My model_def.yaml
input_features:
- name: utterance
type: sequence
encoder: rnn
cell_type: lstm
bidirectional: true
num_layers: 2
reduce_output: None
output_features:
- name: intent
type: category
reduce_input: sum
num_fc_layers: 1
fc_size: 64
- name: slots
type: sequence
decoder: tagger
Dummy Dataset:
Attached the screenshot error:
Can anyone help me on this in Google Colab GPU / Python 3.6
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:10 (3 by maintainers)
Top Results From Across the Web
ImportError: Cannot load backend 'TkAgg' which requires the ...
I have tried to reinstall matplotlib in several ways, and install tk-dev, all of them don't work. import matplotlib import glob **matplotlib.use ...
Read more >Cannot load backend 'TkAgg' which requires the 'tk' interactive ...
ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running #415.
Read more >Cannot load backend 'TkAgg' which requires the 'tk' interactive ...
Coding example for the question ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running.
Read more >Ssh x11 forwarding - Cannot load backend 'TkAgg' which ...
Ssh x11 forwarding - Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running.
Read more >how to turn off "headless" mode? : r/bashonubuntuonwindows
... ImportError( ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running`.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes I will update to version 0.1.1 once enough bugs are fixed. In the mean time can you please try with
pip install https://github.com/uber/ludwig/archive/master.zip
which should install the current code in the master branch?So it turns out
mpl.use('TKAgg')
was needed to render windows in Mac OS X in older versions ofmatplotlib
. I removed it and increased thematplotlib
version in the requirements. Please confirm this solves the issue.