0

I installed tk-8.6.8.3 using pacman and I can import tkinter in python3 but not in python2. There doesn't seem to be a separate package for tkinter for python2 in the repositories. How do I get tkinter to work in python2?

1 Answer 1

0

When you install the tk package with pacman I believe it should be available to both python3 and python2 in Manjaro and Arch.

Try import Tkinter in the python2 interpreter (With the capitalized 'T').

5
  • Damn! So it's Tkinter in python2 and tkinter in python3! I am trying to run UCSF-Chimera and it's not able to import Tkinter. It says, File "/opt/UCSF/Chimera64-1.12/share/chimera/replyobj.py", line 24, in <module> import Tkinter File "/opt/UCSF/Chimera64-1.12/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: /usr/lib64/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var I know I'm straying away from the original question, but any ideas how this can be fixed? Any configuration? Commented Jun 28, 2018 at 7:41
  • Did you build UCSF-Chimera from the AUR package?
    – 0B51D14N
    Commented Jun 28, 2018 at 17:14
  • Nope. I downloaded the executable from their website to build it. The AUR package is outdated (2013). Commented Jun 29, 2018 at 5:05
  • Even in Pymol (that runs fine and I'm using it currently as a replacement), the PDB plugin requires Tkinter and it doesn't work. It says ModuleNotFoundError: No module named 'tkSimpleDialog'. This leads me to believe it is a Tkinter problem. Commented Jun 29, 2018 at 5:06
  • Solved it using this: aur.archlinux.org/packages/ucsf-chimera/?comments=all Commented Jun 29, 2018 at 6:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .