1、conda create -n XXX(环境名)python=X.X(该环境中希望安装的python版本。 --yolo -python3.9
2、conda activate yolo --进入创建的虚拟环境
3、conda list --查看环境配置
4、conda install cudnn==8.1.0
5、cmd命令:
cd / 回到根目录
cd ../ 回到上一级目录
进入某一目录:直接D:或者E:
6、pip install -r requirements.txt
7、conda info --envs 查看创建的虚拟环境路径
8、报错:
ckagesNotFoundError: The following packages are not available from current channels:
- torchvision==0.10.0+cu111
- torch==1.9.0+cu111
Current channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
- defaults
- https://repo.anaconda.com/pkgs/main
- https://repo.anaconda.com/pkgs/r
- https://repo.anaconda.com/pkgs/msys2
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
解决:在该链接https://anaconda.org下搜索
9、pillow和pytorch、numpy版本问题,安装卸载使用pip,不用conda,解决。
10、安装pyqt:
pip install PyQt5
pip install pyqt5-tools -i https://pypi.tuna.tsinghua.edu.cn/simple
11、conda create -n XXX --clone yolo5 复制已有环境
12、conda env list 查看创建的环境
13、conda config --show channels 查看源
14、conda config --remove channels https:// 删除源
15、conda clean --all 清除缓存
16、conda config --add channels ... 添加源
17、nvcc --version 查看CUDA版本
18、watch -n 1 nvidia-smi 查看GPU使用情况
19、dwebp input.webp -o output.png 将webp文件转换为png文件
20、conda env remove -n myenv 删除环境