我在 Ubuntu 12.04 LTS ( http://code.google.com/p/cefpython/ )中安装了 64 位的 cefpython 包。问题是我无法运行这些示例。它说没有名为 wx 的模块。但是当我导航到目录 /usr/local/lib/python2.7/dist-packages/cefpython1 并导入 wx 时,它可以工作。所以基本上我无法在该目录之外导入 wx 。我在终端上使用 python 解释器。
rishi:cefpython1 ls
cefclient cefpython_py27.pyc chrome.pak examples __init__.pyc LICENSE.txt wx
cefpython_py27.py cefpython_py27.so devtools_resources.pak __init__.py libcef.so locales
rishi:cefpython1 python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>>
[2]+ Stopped python
rishi:cefpython1 cd ..
rishi:dist-packages python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named wx
>>>
KeyboardInterrupt
>>>
我的 PATH 如下,PYTHONPATH 为空:在 Ubuntu 12.04 LTS ( http://code.google.com/p/cefpython/ ) 中安装了 64 位的 cefpython 包。问题是我无法运行这些示例。它说没有名为 wx 的模块。但是当我导航到目录 /usr/local/lib/python2.7/dist-packages/cefpython1 并导入 wx 时,它可以工作。所以基本上我无法在该目录之外导入 wx 。我在终端上使用 python 解释器。
rishi:dist-packages echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
rishi:dist-packages echo $PYTHONPATH
rishi:dist-packages echo $PYTHONPATH
rishi:dist-packages