Skip to content

Commit

Permalink
Attempt to install tk for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
AshMartian committed Mar 8, 2024
1 parent 6c6ae04 commit 45f9b33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ def install_tkinter():
subprocess.run(['brew', 'install', 'python-tk'])
except FileNotFoundError:
pass
# If Linux, attempt to install via apt
elif platform.system() == 'Linux':
try:
import subprocess
subprocess.run(['apt', 'install', 'python3-tk'])
except FileNotFoundError:
pass
except:
print("Could not install tkinter")

Expand Down

0 comments on commit 45f9b33

Please sign in to comment.