环境配置

环境配置#

本篇使用 conda 配置 cmake 环境。

  1. 创建并激活 conda 环境

conda create -n ai python=3.12
conda activate ai
  1. 安装 cmake

pip install cmake -i https://pypi.tuna.tsinghua.edu.cn/simple
  1. 安装 ninja,作为 cmake 的 generator:

conda install -c conda-forge ninja
  1. 安装 C/C++ 编译器

conda install -c conda-forge gcc gxx
  1. 安装 ipykernel 用于 Jupyter notebook

pip install ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple
  1. 安装 Conan

pip install conan -i https://pypi.tuna.tsinghua.edu.cn/simple