python - 如何在 Mac 上安装 Jupyter 的 Rust?

标签 python macos rust jupyter-notebook anaconda

我很了解 Python,并且我想学习第二门语言。我有学习 Rust 的资源,但我需要安装方面的帮助。你看,我有 Anaconda 和 Jupyter,显然是 Python 启动的。我想将 rust 安装为 Jupyter 内核,以便我可以学习 Rust,并通过 Redox 引擎用它制作游戏。但首先我想在 Jupyter 上学习和试验 Rust。

最佳答案

您可以使用 Evcxr Jupyter Kernel 在 mac 上安装适用于 jupyter 的 rust

我按照 the video 的教程进行操作

  1. 安装 miniconda/anaconda
  2. 创建并激活 conda 环境
conda create -n rustjupyter python=3.8
conda activate rustjupter
  • 安装 jupyterlab (1.1.4)、cmake、nodejs (13.10.1)
  • conda install -c conda-forge jupyterlab==1.1.4
    conda install -c anaconda cmake
    conda install -c conda-forge nodejs=13.10.1
    
  • 安装 Rust (1.68.0+)
  • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  • 安装 evcxr_jupyter
  • cargo install evcxr_jupyter
    evcxr_jupyter --install
    
  • 运行 jupyter 实验室
  • jupyter lab
    
  • 在浏览器上访问 http://localhost:8888/,在 Notebook 部分中选择 Rust
  • image

  • 现在您可以在 Jupyter 上运行 Rust

  • 更多Evcxr命令使用信息,请关注document

    关于python - 如何在 Mac 上安装 Jupyter 的 Rust?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71401900/

    相关文章:

    macos - 为什么我不能在/etc/shells中添加fish?

    rust - 为什么我得到 "parameter is never used [E0392]"?

    rust 宏 : Calling function dependent on expression

    python - 在 Python 中绘制 pandas 数据框和多处理

    python - 在python中的当前实例中引用类的先前实例

    macos - 如何在mac上安装/启动neo4j?

    macos - 在 OSX 上安装 Chorus 的 GreenPlum

    rust - 为什么打开克隆的 Rc 会引起 panic ?

    python - pandas 填充数据框中给定的缺失时间间隔

    python - 如何在 PIL 中使用 unicode 字符?