安装支持 C++ 的 jupyter

Xeus-Cling 支持在 jupyter 中执行 C++ 代码,可以通过 anaconda 或者 miniconda 来安装。最先尝试通过如下的命令来装到电脑上,相关的参考页面是 https://www.learnopencv.com/xeus-cling-run-c-code-in-jupyter-notebook/

conda create -n xeus-cling
conda activate xeus-cling
conda install -c conda-forge xeus-cling
conda activate xeus-cling
jupyter-notebook

,安装之后发现 jupyter 里没有 C++ 选项。然后才找到能正确安装的方法,见 https://github.com/QuantStack/xeus-cling/issues/212

conda install xeus-cling notebook -c conda-forge/label/gcc7

具体是什么问题就不管了,反正能解决就行。最近不知道怎么搞的,时间总显得不够用。

一些相关的网页链接如下

https://github.com/QuantStack/xeus-cling

https://xeus-cling.readthedocs.io/en/latest/rich_display.html

https://xeus-cling.readthedocs.io/en/latest/installation.html

不知道一个 交互式的 C++ 意义何在,算是    另一个版本的 ROOT? 不管怎么说,能在 jupyter 上交互执行总是不错。现在这个版本似乎还有不少缺陷,比如看起来不能直接执行终端命令,那能力不是残缺很多; 还有已经定义的变量不能重新定义,执行的内核似乎很容易崩。希望未来能发展到更好

最后放一张安装好后执行的图

 

Visits: 526

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

*