2

我正在使用为 tkinter 配置的 anaconda python 包。

我按照https://www.python.org/download/mac/tcltk/安装了 ActiveTcl, 我能够很好地导入其他库,运行 ipython 等。只是不是 python3 中的 tkinter 或 python2 中的 Tkinter。当我尝试导入 tkinter 时,我收到以下消息:

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
4

0 回答 0