查看当前conda配置
conda config --show channels
删除当前conda配置的源
conda config --remove-key channels
添加channel(清华源)
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/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
pip配置清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
设置搜索是显示通道地址。这个命令的作用是在使用conda进行包管理操作(如安装、更新等)时,显示每个包的来源URL。这样可以让用户知道这些包是从哪个源下载的。
conda config --set show_channel_urls yes
要使用特定版本的 Python 创建环境
conda create -n myenv python=3.9
删除某个环境
conda remove -n 环境名 --all
显示关于 NVIDIA GPU 的状态和使用情况的信息。这个命令可以在 Linux 和 Windows 的命令行中运行。
nvidia-smi
检查 NVIDIA CUDA 编译器(nvcc)的版本信息
nvcc -V
nvcc 是 NVIDIA CUDA 编译器的缩写,它是 CUDA 开发环境的一部分,用于将 CUDA 代码编译成可以在 NVIDIA GPU 上运行的代码。
-V 是一个选项,用于打印编译器的版本信息。
linux查看Ubuntu系统的版本
lsb_release -a
获取电脑和操作系统架构,例如:x86架构
uname -a