aws-s3-bucket-browser icon indicating copy to clipboard operation
aws-s3-bucket-browser copied to clipboard

ModuleNotFoundError: No module named 'tkinter' in Ubuntu 20.04

Open rohan-paul opened this issue 3 years ago • 3 comments

To Reproduce

Just after importing like import pywhatkit getting below error

Traceback (most recent call last):
  File "/home/paul/.local/lib/python3.9/site-packages/mouseinfo/__init__.py", line 276, in <module>
    import tkinter
ModuleNotFoundError: No module named 'tkinter'

During the handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/paul/.local/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_34419/1952111025.py", line 2, in <module>
    import pywhatkit
  File "/home/paul/.local/lib/python3.9/site-packages/pywhatkit/__init__.py", line 16, in <module>
    from pywhatkit.whats import (
  File "/home/paul/.local/lib/python3.9/site-packages/pywhatkit/whats.py", line 7, in <module>
    import pyautogui as pg
  File "/home/paul/.local/lib/python3.9/site-packages/pyautogui/__init__.py", line 249, in <module>
    import mouseinfo
  File "/home/paul/.local/lib/python3.9/site-packages/mouseinfo/__init__.py", line 280, in <module>
    sys.exit('NOTE: You must install tkinter on Linux to use MouseInfo. Run the following: sudo apt-get install python3-tk python3-dev')
SystemExit: NOTE: You must install tkinter on Linux to use MouseInfo. Run the following: sudo apt-get install python3-tk python3-dev
  • OS: Ubuntu 20.04

I have already done

sudo apt-get install python3-tk python3-dev
sudo apt-get install python-tk

rohan-paul avatar May 26 '22 11:05 rohan-paul