我很了解 Python,并且我想学习第二门语言。我有学习 Rust 的资源,但我需要安装方面的帮助。你看,我有 Anaconda 和 Jupyter,显然是 Python 启动的。我想将 rust 安装为 Jupyter 内核,以便我可以学习 Rust,并通过 Redox 引擎用它制作游戏。但首先我想在 Jupyter 上学习和试验 Rust。
最佳答案
您可以使用 Evcxr Jupyter Kernel 在 mac 上安装适用于 jupyter 的 rust
我按照 the video 的教程进行操作
- 安装 miniconda/anaconda
- 创建并激活 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
- 现在您可以在 Jupyter 上运行 Rust
更多Evcxr命令使用信息,请关注document
关于python - 如何在 Mac 上安装 Jupyter 的 Rust?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71401900/