【发布时间】:2014-02-18 20:06:53
【问题描述】:
我以为我会从使用 Tkinter 转到 wxPython,但我遇到了一些麻烦。我得到的只是这个:
>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named wx
我已经安装了 wxPython。当我运行卸载程序时,我清楚地看到已安装 wxPython:
1. wxPython3.0-osx-cocoa-py2.7 3.0.0.0
Enter the number of the install to examine or 'Q' to quit:
当我启动 Python 时,我发现我的版本应该与 wxPython 的版本匹配:
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
我使用的是 OS X 10.7.5 32 位。
任何帮助都会很棒! :)
【问题讨论】:
-
使用该帖子中给出的命令运行 python 并不能解决我的问题。
-
Mac 上的 wxpython 有点麻烦,因为苹果预装了 python。你确定你正在运行你安装 wx 的 python 实例吗?
标签: python python-2.7 wxpython osx-lion