no module named tkinter
i have never had this issue before. how can i fix this ? it says no module named tkinter
(env_maskrcnn) haziq@vita-workstation2:~/human-pose-estimation$ ./run.sh
Traceback (most recent call last):
File "pose_estimation/valid.py", line 32, in <module>
import dataset
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/__init__.py", line 12, in <module>
from .coco import COCODataset as coco
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/coco.py", line 19, in <module>
from pycocotools.coco import COCO
File "/home/haziq/.local/lib/python3.6/site-packages/pycocotools/coco.py", line 49, in <module>
import matplotlib.pyplot as plt
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2374, in <module>
switch_backend(rcParams["backend"])
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 5, in <module>
import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'
tkinter
add a comment |
i have never had this issue before. how can i fix this ? it says no module named tkinter
(env_maskrcnn) haziq@vita-workstation2:~/human-pose-estimation$ ./run.sh
Traceback (most recent call last):
File "pose_estimation/valid.py", line 32, in <module>
import dataset
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/__init__.py", line 12, in <module>
from .coco import COCODataset as coco
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/coco.py", line 19, in <module>
from pycocotools.coco import COCO
File "/home/haziq/.local/lib/python3.6/site-packages/pycocotools/coco.py", line 49, in <module>
import matplotlib.pyplot as plt
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2374, in <module>
switch_backend(rcParams["backend"])
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 5, in <module>
import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'
tkinter
add a comment |
i have never had this issue before. how can i fix this ? it says no module named tkinter
(env_maskrcnn) haziq@vita-workstation2:~/human-pose-estimation$ ./run.sh
Traceback (most recent call last):
File "pose_estimation/valid.py", line 32, in <module>
import dataset
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/__init__.py", line 12, in <module>
from .coco import COCODataset as coco
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/coco.py", line 19, in <module>
from pycocotools.coco import COCO
File "/home/haziq/.local/lib/python3.6/site-packages/pycocotools/coco.py", line 49, in <module>
import matplotlib.pyplot as plt
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2374, in <module>
switch_backend(rcParams["backend"])
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 5, in <module>
import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'
tkinter
i have never had this issue before. how can i fix this ? it says no module named tkinter
(env_maskrcnn) haziq@vita-workstation2:~/human-pose-estimation$ ./run.sh
Traceback (most recent call last):
File "pose_estimation/valid.py", line 32, in <module>
import dataset
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/__init__.py", line 12, in <module>
from .coco import COCODataset as coco
File "/home/haziq/human-pose-estimation/pose_estimation/../lib/dataset/coco.py", line 19, in <module>
from pycocotools.coco import COCO
File "/home/haziq/.local/lib/python3.6/site-packages/pycocotools/coco.py", line 49, in <module>
import matplotlib.pyplot as plt
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2374, in <module>
switch_backend(rcParams["backend"])
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 207, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/haziq/.local/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 5, in <module>
import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'
tkinter
tkinter
asked Feb 8 at 12:52
KongKong
3291719
3291719
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Try run:
sudo apt install python3-tk
It will install tkinter
module for python 3
.
add a comment |
There are a plethora of choices - use apt-cache search tkinter
and you'll see:
$ apt-cache search tkinter
idle - IDE for Python using Tkinter (default version)
idle-python2.7 - IDE for Python (v2.7) using Tkinter
idle3 - IDE for Python using Tkinter (default version)
python-tk - Tkinter - Writing Tk applications with Python
python-tk-dbg - Tkinter - Writing Tk applications with Python (debug extension)
python3-tk - Tkinter - Writing Tk applications with Python 3.x
python3-tk-dbg - Tkinter - Writing Tk applications with Python 3.x (debug extension)
idle-python3.5 - IDE for Python (v3.5) using Tkinter
libsnack-alsa - Sound extension to Tcl/Tk and Python/Tkinter - ALSA files
libsnack-oss - Sound extension to Tcl/Tk and Python/Tkinter - OSS files
pypy-tk - Tkinter module for PyPy (an alternative Python interpreter)
python-easygui - module for very simple, very easy GUI programming in Python
python-editobj - Python object editor
python-opengl - Python bindings to OpenGL (Python 2)
python-pmw - Pmw -- Python MegaWidgets
python-pmw-doc - Pmw -- Python MegaWidgets
python-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 2.x library
python3-easygui - module for very simple, very easy GUI programming in Python3
python3-opengl - Python bindings to OpenGL (Python 3)
python3-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 3.x library
tcl-snack - Sound extension to Tcl/Tk and Python/Tkinter - Tcl/Tk library
tcl-snack-dev - Sound extension to Tcl/Tk and Python/Tkinter - development files
tcl-snack-doc - Sound extension to Tcl/Tk and Python/Tkinter - documentation
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1116664%2fno-module-named-tkinter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try run:
sudo apt install python3-tk
It will install tkinter
module for python 3
.
add a comment |
Try run:
sudo apt install python3-tk
It will install tkinter
module for python 3
.
add a comment |
Try run:
sudo apt install python3-tk
It will install tkinter
module for python 3
.
Try run:
sudo apt install python3-tk
It will install tkinter
module for python 3
.
answered Feb 8 at 13:00
MatejMatej
11113
11113
add a comment |
add a comment |
There are a plethora of choices - use apt-cache search tkinter
and you'll see:
$ apt-cache search tkinter
idle - IDE for Python using Tkinter (default version)
idle-python2.7 - IDE for Python (v2.7) using Tkinter
idle3 - IDE for Python using Tkinter (default version)
python-tk - Tkinter - Writing Tk applications with Python
python-tk-dbg - Tkinter - Writing Tk applications with Python (debug extension)
python3-tk - Tkinter - Writing Tk applications with Python 3.x
python3-tk-dbg - Tkinter - Writing Tk applications with Python 3.x (debug extension)
idle-python3.5 - IDE for Python (v3.5) using Tkinter
libsnack-alsa - Sound extension to Tcl/Tk and Python/Tkinter - ALSA files
libsnack-oss - Sound extension to Tcl/Tk and Python/Tkinter - OSS files
pypy-tk - Tkinter module for PyPy (an alternative Python interpreter)
python-easygui - module for very simple, very easy GUI programming in Python
python-editobj - Python object editor
python-opengl - Python bindings to OpenGL (Python 2)
python-pmw - Pmw -- Python MegaWidgets
python-pmw-doc - Pmw -- Python MegaWidgets
python-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 2.x library
python3-easygui - module for very simple, very easy GUI programming in Python3
python3-opengl - Python bindings to OpenGL (Python 3)
python3-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 3.x library
tcl-snack - Sound extension to Tcl/Tk and Python/Tkinter - Tcl/Tk library
tcl-snack-dev - Sound extension to Tcl/Tk and Python/Tkinter - development files
tcl-snack-doc - Sound extension to Tcl/Tk and Python/Tkinter - documentation
add a comment |
There are a plethora of choices - use apt-cache search tkinter
and you'll see:
$ apt-cache search tkinter
idle - IDE for Python using Tkinter (default version)
idle-python2.7 - IDE for Python (v2.7) using Tkinter
idle3 - IDE for Python using Tkinter (default version)
python-tk - Tkinter - Writing Tk applications with Python
python-tk-dbg - Tkinter - Writing Tk applications with Python (debug extension)
python3-tk - Tkinter - Writing Tk applications with Python 3.x
python3-tk-dbg - Tkinter - Writing Tk applications with Python 3.x (debug extension)
idle-python3.5 - IDE for Python (v3.5) using Tkinter
libsnack-alsa - Sound extension to Tcl/Tk and Python/Tkinter - ALSA files
libsnack-oss - Sound extension to Tcl/Tk and Python/Tkinter - OSS files
pypy-tk - Tkinter module for PyPy (an alternative Python interpreter)
python-easygui - module for very simple, very easy GUI programming in Python
python-editobj - Python object editor
python-opengl - Python bindings to OpenGL (Python 2)
python-pmw - Pmw -- Python MegaWidgets
python-pmw-doc - Pmw -- Python MegaWidgets
python-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 2.x library
python3-easygui - module for very simple, very easy GUI programming in Python3
python3-opengl - Python bindings to OpenGL (Python 3)
python3-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 3.x library
tcl-snack - Sound extension to Tcl/Tk and Python/Tkinter - Tcl/Tk library
tcl-snack-dev - Sound extension to Tcl/Tk and Python/Tkinter - development files
tcl-snack-doc - Sound extension to Tcl/Tk and Python/Tkinter - documentation
add a comment |
There are a plethora of choices - use apt-cache search tkinter
and you'll see:
$ apt-cache search tkinter
idle - IDE for Python using Tkinter (default version)
idle-python2.7 - IDE for Python (v2.7) using Tkinter
idle3 - IDE for Python using Tkinter (default version)
python-tk - Tkinter - Writing Tk applications with Python
python-tk-dbg - Tkinter - Writing Tk applications with Python (debug extension)
python3-tk - Tkinter - Writing Tk applications with Python 3.x
python3-tk-dbg - Tkinter - Writing Tk applications with Python 3.x (debug extension)
idle-python3.5 - IDE for Python (v3.5) using Tkinter
libsnack-alsa - Sound extension to Tcl/Tk and Python/Tkinter - ALSA files
libsnack-oss - Sound extension to Tcl/Tk and Python/Tkinter - OSS files
pypy-tk - Tkinter module for PyPy (an alternative Python interpreter)
python-easygui - module for very simple, very easy GUI programming in Python
python-editobj - Python object editor
python-opengl - Python bindings to OpenGL (Python 2)
python-pmw - Pmw -- Python MegaWidgets
python-pmw-doc - Pmw -- Python MegaWidgets
python-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 2.x library
python3-easygui - module for very simple, very easy GUI programming in Python3
python3-opengl - Python bindings to OpenGL (Python 3)
python3-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 3.x library
tcl-snack - Sound extension to Tcl/Tk and Python/Tkinter - Tcl/Tk library
tcl-snack-dev - Sound extension to Tcl/Tk and Python/Tkinter - development files
tcl-snack-doc - Sound extension to Tcl/Tk and Python/Tkinter - documentation
There are a plethora of choices - use apt-cache search tkinter
and you'll see:
$ apt-cache search tkinter
idle - IDE for Python using Tkinter (default version)
idle-python2.7 - IDE for Python (v2.7) using Tkinter
idle3 - IDE for Python using Tkinter (default version)
python-tk - Tkinter - Writing Tk applications with Python
python-tk-dbg - Tkinter - Writing Tk applications with Python (debug extension)
python3-tk - Tkinter - Writing Tk applications with Python 3.x
python3-tk-dbg - Tkinter - Writing Tk applications with Python 3.x (debug extension)
idle-python3.5 - IDE for Python (v3.5) using Tkinter
libsnack-alsa - Sound extension to Tcl/Tk and Python/Tkinter - ALSA files
libsnack-oss - Sound extension to Tcl/Tk and Python/Tkinter - OSS files
pypy-tk - Tkinter module for PyPy (an alternative Python interpreter)
python-easygui - module for very simple, very easy GUI programming in Python
python-editobj - Python object editor
python-opengl - Python bindings to OpenGL (Python 2)
python-pmw - Pmw -- Python MegaWidgets
python-pmw-doc - Pmw -- Python MegaWidgets
python-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 2.x library
python3-easygui - module for very simple, very easy GUI programming in Python3
python3-opengl - Python bindings to OpenGL (Python 3)
python3-tksnack - Sound extension to Tcl/Tk and Python/Tkinter - Python 3.x library
tcl-snack - Sound extension to Tcl/Tk and Python/Tkinter - Tcl/Tk library
tcl-snack-dev - Sound extension to Tcl/Tk and Python/Tkinter - development files
tcl-snack-doc - Sound extension to Tcl/Tk and Python/Tkinter - documentation
answered Feb 8 at 13:01
waltinatorwaltinator
22.6k74169
22.6k74169
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1116664%2fno-module-named-tkinter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown