ubuntu1804安装jupyter中的js环境

2023-12-13 03:41:05

参考:
https://github.com/n-riesco/ijavascript

http://n-riesco.github.io/ijavascript/#installation

https://github.com/n-riesco/ijavascript/issues/241

https://www.tomche.space/post/using-javascript-kernel-in-vscode-jupyter-notebooks/

https://www.tomche.space/post/using-javascript-kernel-in-vscode-jupyter-notebooks/

https://anaconda.org/javascript/repo?type=conda&label=main

https://www.npmjs.com/package/node-gyp

sudo apt-get install nodejs npm jupyter
npm config set prefix $HOME
npm install -g ijavascript
ijsinstall

特别注意: if ~/bin folder didn’t exist before, after running this instructions, you may need to log out and back in for ~/bin to be added to your PATH.
也就是需要环境变量。如果~/bin不太好用,或者报错ijsinstall找不到命令,可以使用如下命令:

sudo ln -s ~/bin/ijsconsole /usr/bin/ijsconsole
sudo ln -s ~/bin/ijsinstall /usr/bin/ijsinstall
sudo ln -s ~/bin/ijskernel /usr/bin/ijskernel
sudo ln -s ~/bin/ijsnotebook /usr/bin/ijsnotebook
sudo ln -s ~/bin/node-gyp /usr/bin/node-gyp

如果报错没有0.1版本的gyp,可以安装node-gyp

npm install gyp@0.1

同时记得设置镜像源

npm config set registry http://registry.npm.taobao.org/
npm config get registry

文章来源:https://blog.csdn.net/weixin_54227557/article/details/134810445
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。