jupyter c++/python/js/ts
jupyter notebook和juypter lab 对windows c++ kernel都支持的不好:
https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
如果要用(cling 或者xeus-cling),只能选中*nix平台, 测试windows wsl也可以,步骤如下
1.安装wsl
2.装miniconda,不要装anaconda(里面的zmq会和cling冲突)
3.安装python包
1 2 3 | conda install - c conda - forge jupyterlab conda install - c conda - forge xeus - cling conda install - c conda - forge boost |
4.配置jupyter lab
jupyter lab --generate-config
jupyter_lab_config.py 内容:(密码abc123)
1 2 3 4 5 6 | c.NotebookApp.notebook_dir = '/mnt/d/jupyter' c.NotebookApp.ip = '0.0.0.0' c.NotebookApp.password = 'sha1:9fb88efadb70:8cb38c269297edbbc6a02f5b11ad8d346e2b9fdd' c.NotebookApp.open_browser = False c.NotebookApp.port = 33333 c.NotebookApp.allow_remote_access = True |
5.如果有权限问题:
chmod 777 /home/wyt/.jupyter/jupyter_lab_config.py
chmod 777 /home/wyt/.condarc
6.重启一下wsl(wsl -t debian),不会的话重启电脑
7.运行:jupyter-lab
8.几个测试代码
1 2 | #include <stdio.h> printf ( "hello, world.\n" ); |
1 2 3 4 5 6 7 8 | #include <boost/format.hpp> #include <boost/tokenizer.hpp> #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/join.hpp> std::vector<std::string> cmdarray; boost::split(cmdarray, "abc def.123;456" , boost::is_any_of( " .,:;" ), boost::token_compress_on); std::cout << "output size: " << cmdarray.size() << std::endl; |
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战