杂七杂八的要点

1、创建、删除、退出虚拟环境

conda create -n defect python=3.7    //创建虚拟环境 
source activate your_env_name    //激活虚拟环境
source deactivate your_env_name   //退出虚拟环境
conda remove -n your_env_name(虚拟环境名称) --all   //删除虚拟环境
conda remove --name $your_env_name  $package_name(包名)  # 删除虚拟环境中的包
conda list:查看安装了哪些包
conda install package_name(包名):安装包
conda env list 或 conda info -e:查看当前存在哪些虚拟环境
conda update conda:检查更新当前conda

2、查看GPU使用情况

#sudo apt install nvidia-340

nvidia-smi

3、Ubuntu18.04下载完搜狗后打印出来的是繁体字

解决办法:
shift + ctrl + f 键可以切换简体中文和繁体中文。

4、Ubuntu18.04亮度调节

sudo apt-get install brightness-controller
在应用程序中搜索brightness-controler

5、Anaconda查看源、添加、删除

conda config --show-sources
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/  //添加源
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/  //删除源

添加清华源

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/pytorch/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/

6、安装pytorch

pip install torch==1.5.0 -i https://pypi.douan.com/simple

pip install torchvision==0.6.0

如果上面方法不行则采用下面的方法

pip install torch===1.5.1 torchvision===0.6.1 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.douban.com/simple

pip install keras -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值