【问题标题】:Install python3-tk on pythonanywere在 pythonanywhere 上安装 python3-tk
【发布时间】:2017-07-26 08:46:02
【问题描述】:

我尝试在 pythonanywere.com 上使用 turtle 模块运行脚本,但是遇到了一个错误,找不到名为“tkinter”的模块,我需要安装 python3-tk 包。我按照本教程 installing new modules on pythonanywhere 尝试通过运行 pip3.5 install --user package3-tk 在 pythonanywere.com 上的 Bash 控制台中安装包。 但是,我收到“找不到满足 package3-tk 要求的版本”的错误。

我也尝试用tkinter 替换包名,但也没有成功。

【问题讨论】:

  • 一次谷歌搜索和几次点击就可以得到答案。

标签: python-3.x tkinter


【解决方案1】:

您不能在 pythonanywhere 等服务器上使用 tkinter 模块。它需要连接到显示器,而不仅仅是浏览器窗口。

https://www.pythonanywhere.com/forums/topic/360/

【讨论】:

    【解决方案2】:

    刚刚学到了通过以不同方式提问来寻找答案的课程。我的目的是在 pythonanywere 上使用 turtle 模块,如上面的答案所述,这是不可能的。但是,我刚刚发现pythonanywhere有一个免费的附属网站,并且支持turtle (www.trinker.io)

    【讨论】:

    • 只是来自 PythonAnywhere 开发人员的简短说明 -- 我认为您的意思是 trinket.io -- 他们不是附属网站,只是另一个我们认为对于那些想用乌龟。
    猜你喜欢
    • 1970-01-01
    • 2018-02-18
    • 2017-03-28
    • 1970-01-01
    • 1970-01-01
    • 2016-08-01
    • 1970-01-01
    • 2018-01-17
    • 1970-01-01
    相关资源
    最近更新 更多