Reputation: 61
import pyautogui
I am getting an import error:
Traceback (most recent call last):
File "<stdin>", line 1, in
File "/usr/local/lib/python3.7/site-packages/pyautogui/__init__.py", line 150, in <module>
from pymsgbox import alert, confirm, prompt, password File "/usr/local/lib64/python3.7/site-packages/pymsgbox/__init__.py", line 56, in <module>
if tk.TkVersion < 8.0: AttributeError: module 'tkinter' has no attribute 'TkVersion'
Upvotes: 2
Views: 506
Reputation: 138
I switched to version PyAutoGUI==0.9.0, and it worked (python 3.11, Ubuntu 24.04.1 LTS)
Upvotes: 0
Reputation: 1
Maybe it's because you didn't install pyautogui or don't you have the latest version (this can also be done by reinstalling it). This video explains how to install pyautogui: https://youtu.be/-jxt7pVNAAk
The error looks unfamiliar to me, so I don't know if that's the issue. It also discribes more than 1 line.
Upvotes: 0
Reputation: 341
The error is clearly showing AttributeError: module 'tkinter' has no attribute 'TkVersion'
so either your Tkinter module isn't updated, or your Tkinter module has some errors
Upvotes: 0