一、安装anaconda
地址,下载完成后,直接默认安装即可。
二、配置源
2.1 设置清华镜像
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
2.2 设置bioconda
conda config --add channels bioconda
conda config --add channels conda-forge
2.3 设置搜索时显示通道地址
conda config --set show_channel_urls yes
三、创建虚拟机
3.1 新建虚拟机
conda create -n yolov12 python=3.8
3.2 切换虚拟机
conda activate yolov12
四、安装yolov12
pip install ultralytics
五、验证安装成功
yolo predict model=yolo11n.pt source='https://ultralytics.com/images/bus.jpg'