当前位置: 首页 > 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.lryc.cn/news/575835.html

相关文章:

  • YOLOv8快速入门
  • HarmonyOS NEXT仓颉开发语言实现画板案例
  • fish安装node.js环境
  • 【开发杂谈】Auto Caption:使用 Electron 和 Python 开发实时字幕显示软件
  • Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory
  • 车联网网络安全渗透测试:深度解析与实践
  • 商品中心—15.库存分桶扣减的技术文档
  • 一款被我拿来处理图片和视频的免费环保软件
  • Web基础关键_003_CSS(一)
  • 小程序学习笔记:加载效果、上拉加载与节流处理
  • Ubuntu安装Docker部署Python Flask Web应用
  • PHP语法基础篇(六):数组
  • 代码随想录|图论|09沉没孤岛
  • LSTM每个变量的shape分析
  • 从输入到路径:AI赋能的地图语义解析与可视化探索之旅
  • 通过ETL从MySQL同步到GaussDB
  • 喜讯 | Mediatom斩获2025第十三届TopDigital创新营销奖「年度程序化广告平台」殊荣
  • LINUX625 DNS反向解析
  • 基于 Spring Boot + Vue 3的现代化社区团购系统
  • 科技如何影响我们的生活?
  • 工业电子 | 什么是SerDes,为何工业和汽车应用需要它?
  • HarmonyOS NEXT仓颉开发语言实战案例:简约音乐播放页
  • 金蝶云星空客户端自定义控件插件-WPF实现自定义控件
  • 使用Docker部署mysql8
  • 社会工程--如何使用对方的语言
  • JDBC入门:Java连接数据库全指南
  • AI辅助编写前端VUE应用流程
  • 树状dp(dfs)(一道挺基础的)
  • Spring Boot 项目问题:while constructing a mapping found duplicate key api
  • 微信小程序封装loading 修改