当前位置: 首页 > news >正文

Rust交互式编程环境Jupyter Lab搭建

  • windows 11
  • wsl2
  • Ubuntu 24.04.1 LTS Installer.exe
  • rust-1.31.0-x86_64-unknown-linux-gnu.tar.gz
  • evcxr_jupyter-v0.20.0-x86_64-unknown-linux-gnu.tar.gz
  • Miniconda3-py312_25.1.1-2-Linux-x86_64.sh

/etc/apt/sources.list配置镜像源

deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse# deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiversedeb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse

设置默认wsl子系统为Ubuntu24.04

wsl --set-default Ubuntu-24.04

安装miniconda

chmod +x Miniconda3-py312_25.1.1-2-Linux-x86_64.sh
sh ./Miniconda3-py312_25.1.1-2-Linux-x86_64.sh

添加conda环境变量到.bashrc,并source .bashrc更新

# .bashrc里最末添加
# cmd里面wsl启动默认Ubuntu24.04时切到根目录
cd ~
export PATH="~/miniconda3/bin:$PATH"
# 启动wsl时自动切到下一步创建的虚拟环境
conda activate rustenv

创建conda虚拟环境

conda init
conda create -n rustenv python=3.12
conda activate rustenv


安装Jupyter lab

conda install -c conda-forge jupyterlab

或者使用国内源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
conda install -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main jupyterlab

完全解压到根路径然后安装rust

sh ./rust-1.31.0-x86_64-unknown-linux-gnu/install.sh

添加cargo环境变量到.bashrc

export PATH="~/.cargo/bin:$PATH"

完全解压并安装evcxr_jupyter

evcxr_jupyter --install

运行jupyter lab并选择rust后台

jupyter lab --allow-root

效果

http://www.lqws.cn/news/541639.html

相关文章:

  • 【unitrix】 4.10 数字类型的按位异或运算实现(bitxor.rs)
  • 同样是synthesis(综合) HLS和Vivado里面是有什么区别
  • 【git学习】学习目标及课程安排
  • Java 大视界 -- Java 大数据在智能教育学习社群知识共享与协同学习促进中的应用(326)
  • 【HTML】
  • 中国科技术语杂志中国科技术语杂志社中国科技术语编辑部2025年第3期目录
  • 算法第55天|冗余连接、冗余连接II
  • C++ 第三阶段 并发与异步 - 第二节:异步任务(std::async)
  • 在docker容器中安装docker服务,基于fuse-overlayfs进行overlay挂载,而不是vfs
  • HarmonyOS NEXT仓颉开发语言实现画板案例
  • MySQL 离线安装MariaDB
  • SYSCFG 时钟在 GD32F4 系列微控制器中的作用
  • Layer by Layer: Uncovering Hidden Representations in Language Models
  • 当前最好的0样本文本转语音是哪个模型?
  • SpringCloud系列(38)--SpringCloud Gateway实现动态路由
  • 2024百度之星:BD202404 110串
  • JDY-23蓝牙模块与电脑的连接方式
  • 从0开始学习计算机视觉--Day04--损失函数
  • 杭州西湖断桥不断:3D扫描还原‘残雪‘视觉骗局
  • 在反向代理环境下精准获取客户端真实 IP 的最佳实践
  • Linux journal 日志大小限制与管理详解
  • vue-27(实践练习:将现有组件重构为使用组合式 API)
  • 七天学会SpringCloud分布式微服务——04——Nacos配置中心
  • 便携式水质检测仪的功能
  • 基于 SpringBoot+Vue 的台球厅管理系统的设计与实现(毕业论文)
  • [ linux-系统 ] 磁盘与文件系统
  • 排查 WebView 中 touch、click 事件失效:移动端调试过程详解
  • PIXHAWK(ardupilot4.52)NMEA的解析bug
  • EXCEL数据报表
  • 接口自动化测试框架(pytest+allure+aiohttp+用例自动生成)