如何在 Chromebook 上使用 Tkinter? [英] How can I use Tkinter on a Chromebook?

查看:19
本文介绍了如何在 Chromebook 上使用 Tkinter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何扩展程序、应用程序或在线应用程序可以让我在 Chromebook 上使用 Tkinter?

Is there any extensions, apps, or online applications that would allow me to use Tkinter on a Chromebook?

我正在尝试为我编写的程序制作一个 GUI,Tkinter 看起来不错,但我使用的 Cloud9 不允许图形.

I'm trying to make a GUI for a program I've written and Tkinter seems nice, but I use Cloud9 which doesn't allow for graphics.

我的 Chromebook 上有一个管理锁,这使我无法安装 Ubuntu,这就是我需要在线应用程序、Chrome 扩展程序或 Chrome 应用程序的原因.

I have an administrative lock on my Chromebook which makes me unable to install Ubuntu, which is why I need an online application, Chrome extension, or Chrome app.

推荐答案

您可以在 Chromebook 中使用 tkinter,只需按照以下步骤操作:

You can use tkinter in Chromebook, just follow these steps:

  1. 在 Chromebook 中安装 Ubuntu,请查看此链接 关于如何在 Chromebook 上安装 Ubuntu.
  2. 安装 Ubuntu 后,现在检查您是否有 python.打开命令终端,输入

  1. Install Ubuntu in Chromebook, check this link about How to Install Ubuntu on Chromebook.
  2. After Installing Ubuntu, Now check if you have python or not. Open command terminal, type

python

如果您还没有安装 Python.打开命令终端并输入

If you have not installed Python. Open command terminal and type

sudo apt-get install python3

现在用于安装 tkinter 模块类型

Now for installing tkinter module type

sudo apt-get install python3-tk

现在通过类型从终端检查 python 和 tkinter

Now check both python and tkinter from terminal by type

python3
Python 3.5.1 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
>>> root = Tk()

这篇关于如何在 Chromebook 上使用 Tkinter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆