在debian上安装python pyjamas

2024-05-15 07:47:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我在debian上安装了睡衣

http://pyjs.org/getting_started.html

但是我的程序没有找到模块,可能是什么问题,我已经正确安装了睡衣使用apt get

krisdigitx-virtual-machine ~ # python jamas.py 
Traceback (most recent call last):
  File "jamas.py", line 3, in <module>
    from pyjamas import Window
ImportError: No module named pyjamas
krisdigitx-virtual-machine ~ # 


#!/usr/bin/env python

from pyjs import Window
from pyjs.ui import RootPanel, Button
from pyjs.ui import HTML


def greet(sender):
    Window.alert("Hello Krishna!")

b = Button("click me", greet)
Rootpanel().add(b)

经过一些研究:

我不得不做pyjsbuild jamas.py来获得输出目录,但是它给了我一个新的错误

^{pr2}$

Tags: frompyimportuivirtualbuttonmachinewindow
2条回答
  1. 请转到http://pyjs.org/GettingHelp.html
  2. 第一个链接“Getting Started”是从零开始安装的详细演练。基本上,它说的是:从git存储库获取最新的源代码。在

Wiki文章中详细描述了运行Pyjs和Pyjs桌面的所有步骤,但仍然足够简洁。在

因为你得到了

ImportError: No module named pyjamas

您可能需要使用将模块的路径添加到$PYTHONPATH

export PYTHONPATH=$PYTHONPATH:/usr/share/pyjamas/library

相关问题 更多 >