2

I am using the anaconda python package, which is configured for tkinter.

I installed ActiveTcl, following https://www.python.org/download/mac/tcltk/ I am able to import other libraries fine, run ipython etc. Just not tkinter in python3 or Tkinter in python2. When I try to import tkinter I get the following message:

Python 3.3.1 |Anaconda 1.5.1 (x86_64)| (default, Apr 25 2013, 23:10:48) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/username/anaconda/envs/py3k/lib/python3.3/tkinter/__init__.py", line 40, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: dlopen(/Users/username/anaconda/envs/py3k/lib/python3.3/lib-dynload/_tkinter.so, 2): Library not loaded: /usr/X11/lib/libX11.6.dylib
  Referenced from: /Users/username/anaconda/lib/libtk8.5.dylib
  Reason: image not found
gary
  • 4,227
  • 3
  • 31
  • 58
Dave
  • 21
  • 2
  • You are using a build of python and Tkinter that requires X11. Was that intentional? (I'll admit ignorance on Anaconda, maybe that's a dumb question) – Bryan Oakley May 14 '13 at 23:04
  • Thanks that was it. I had to install Xquartz as Mountain Lion does not come with X11. Not sure why this python pkg needs X11 though. – Dave May 15 '13 at 19:45

0 Answers0