常见命令(更新)

查看当前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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值