gpt4 book ai didi

python - Jupyter Notebook 中没有显示名称,也没有 $DISPLAY 环境变量

转载 作者:太空宇宙 更新时间:2023-11-03 20:44:20 26 4
gpt4 key购买 nike

我想教 children Python。我希望他们使用 Jupyter Notebook。为了避免安装的麻烦,我希望他们使用免费的在线 Jupyter Notebook。我认为 google 的 colab ( link ) 和 jupyter.org ( link ) 可能是最好的解决方案。但是,我尝试了它们并收到以下错误消息:

from turtle import *
colors = ['red', 'purple', 'blue', 'green', 'yellow', 'orange']
for x in range(360):
pencolor(colors[x % 6])
width(x / 100 + 1)
forward(x)
left(59)

TclError: no display name and no $DISPLAY environment variable

最佳答案

您看过这个问题吗:

ipython notebook - $DISPLAY variable error

如果您之前运行过,您的问题可能会得到解决:

%matplotlib inline

关于python - Jupyter Notebook 中没有显示名称,也没有 $DISPLAY 环境变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56694317/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com