简体   繁体   English

在没有jupyter的情况下在python3中运行vpython?

[英]Run vpython in python3 without jupyter possible?

In Python2.7 all my visual scripts were running fine. 在Python2.7中,我的所有可视脚本都运行良好。 When I use Python3.5 I get the error message: 当我使用Python3.5时,我收到错误消息:

get_ipython().kernel.comm_manager.register_target('glow', GlowWidget)
AttributeError: 'NoneType' object has no attribute 'kernel'

When I google the error message people say that you should use the jupyter notebook. 当我谷歌的错误消息时,人们会说你应该使用jupyter笔记本。 But is it possible to run my old scripts without jupyter? 但是没有jupyter可以运行我的旧脚本吗?

you should install ipython and Jupyter Notebook, as following 你应该安装ipython和Jupyter Notebook,如下所示

sudo apt-get install ipython ipython-notebook
pip install jupyter

And then you can use jupyter notebook in the terminal to start your notebook, from where you can create a new vpython notebook in your browser. 然后你可以在终端中使用jupyter notebook启动你的笔记本,你可以在浏览器中创建一个新的vpython笔记本。 create vpython 创建vpython

and then you can write your vpython script and see the objects you created as following. 然后你可以编写你的vpython脚本并查看你创建的对象如下。 draw a sphere 画一个球体

also you can refer to other blogs to install your jupyter notebook and so on. 您也可以参考其他博客来安装您的jupyter笔记本等。 But make sure that you have installed vpython. 但请确保您已安装vpython。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM