我正在尝试在 Jupyter Notebook 中运行 Javascript(除非在 JS 中有一个等效的 notebook 可以轻松测试我的脚本),例如我想运行以下内容:
import pixiedust_node
%%node
var date = new Date();
print(date);
为了安装我尝试过的所有东西:
pip install pixiedust
, pip install pixiedust_node
, conda install -c akode pixiedust
, jupyter pixiedust install
而且,当我尝试在 Jupyter 中加载代码时,我得到了这个:
尝试之后:
conda install -c anaconda nodejs
甚至这个:conda install -c conda-forge nodejs
最佳答案
你实际上可以尝试使用 https://github.com/n-riesco/ijavascript作为笔记本的内核,而不是使用 node over python
关于node.js - 在 Jupyter Notebook 中安装 JS Node,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58063065/