如何快速创建智能桌宠:面向新手的完整桌面宠物框架指南
2026/8/1 23:55:56
conda create -n 环境名称 python=python版本
环境名称可自定义;python=3.8 为指定 Python 版本,按需选选择
conda create -n realtime python=3.8输入上述命令后,会出现下述内容,输入y
conda activate realtime激活后,命令行前缀会变(realtime)代表进入该环境。
# torch为1.8.1 清华镜像 pip3 install torch==1.8.1 torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple#清华镜像 pip install 安装的名称 -i https://pypi.tuna.tsinghua.edu.cn/simple为了避免每次都要加-i参数,可以永久更换 pip 的全局镜像源。
# 配置为清华源 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple # 配置为阿里云源 pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/配置完成后,之后所有的pip install命令都会自动使用该镜像源。
conda env listconda env remove -n 虚拟环境名称python main.py