win10 ubuntu20.04 双系统 装机指南 显卡驱动 输入法 wifi pytorch安装 和 vscode json设置

本文详细介绍了在Win10系统上安装Ubuntu 20.04的过程,包括显卡驱动的安装(使用nvidia-driver-440)、输入法(推荐谷歌拼音)、WiFi设置、PyTorch的安装以及VSCode的JSON设置,旨在提供一站式解决方案。
摘要由CSDN通过智能技术生成

笔记本配置:联想拯救者2020-y7000p

显卡:RTX 2060

建议直接安装ubuntu 20.04版本,若装18.04版本或者19.04 19.10,显卡驱动较难安装,本人在这四个版本中来回折腾,发现还是20.04版本好。其他驱动都选最新版本即可。

装机主要有以下几个部分:显卡驱动、输入法、wifI设置、pytorch安装 和 vscode json设置

# 显卡驱动

千万别像18.04版本那样来回弄lightdm, bios之类的。我就是那样倒腾了3天,发现压根装不好

第一步,连上阿里云;

第二步,只写一句话 terminal: sudo apt install nvidia-driver-440

检查:

1. 重启,terminal中输入:nvidia-smi,有信息显示显卡驱动;
2. 系统图形信息出现RTX 2060。两者都有,表示成功。
另外, terminal输入 nvidia-settings可以调出英伟达的app

 

# 输入法

在2020-06-02号装搜狗拼音(显卡驱动已装好),系统崩溃,怎么弄都不好使,重新装系统才行,原因不明

解决方法:装google pinyin。具体见https://blog.csdn.net/a805607966/article/details/105874756。

不过这个输入法用的不是很习惯,得crtl+space才可以切换中英文。

 

# wifi 设置

参考:https://blog.csdn.net/dieju8330/article/details/101422743
上面这个blog有一定的借鉴意义。要注意的是,并不能完全解决问题。具体如下:

第一步,装最新的内核
网站:[https://kernel.ubuntu.com/~kernel-ppa/mainline/](https://kernel.ubuntu.com/~kernel-ppa/mainline/)
用uname -r查看版本

第二步,装intel官网驱动
问题就是处在这里,不能sudo cp iwlwifi-Qu-*-48.ucode /lib/firmware
查看驱动 dmesg | grep wifi
会报错,显示没找到 iwlwifi-QuZ-*-50.ucode
这时,需要下载补丁
-网站:https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/
-目标,找到最新的文件。 | [linux-firmware-iwlwifi-fw-2020-05-19.tar.gz]这个文件挺大的,接近200m
-根据dmesg | grep wifi的报错情况,把对应的ucode文件 cp 到/lib/firmware
-更新:上面那个blog没提及这个,所以我花了很长时间。记得 sudo update-grub,然后重启

第三步,装ubuntu 官方的linux-firmware驱动
[http://ftp.sjtu.edu.cn/ubuntu/pool/main/l/linux-firmware/](http://ftp.sjtu.edu.cn/ubuntu/pool/main/l/linux-firmware/)
一定要最新的,我用的是1.187
下载后 dpkg -i 包名 安装即可

重启,然后发现‘select network’可用,虽然仍提示没有wifi适配器。选择网络即可链接。

 

# pytorch 安装

选择python 3.8版本
第一步,安装pytorch
升级 pip 到最新的版本 (>=10.0.0) 后进行配置:
(base)模式
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install torch torchvision
(不用pip3)

第二步,安装numpy
(root)模式
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install --upgrade numpy
apt install python-numpy
pip3 install --upgrade numpy

检查
安装完pytorch和numpy后,在base模式下
terminal执行以下命令:
-python3
-import torch as t
注意,若出现‘No module named torch’的错误,不一定是安装错误,可能是在root模式下的缘故。
没有报错则证明安装成功

 

# vscode 设置

为实现xelatex编译和自动换行,快捷键crtl+shift+p找到setting.json,并设置如下:
{
  "latex-workshop.latex.recipes": [{
  "name": "xelatex",
  "tools": [
      "xelatex"
  ]
}, {
  "name": "latexmk",
  "tools": [
      "latexmk"
  ]
},

{
  "name": "pdflatex -> bibtex -> pdflatex*2",
  "tools": [
      "pdflatex",
      "bibtex",
      "pdflatex",
      "pdflatex"
  ]
}
],
"latex-workshop.latex.tools": [{
"name": "latexmk",
"command": "latexmk",
"args": [
  "-synctex=1",
  "-interaction=nonstopmode",
  "-file-line-error",
  "-pdf",
  "%DOC%"
]
}, {
"name": "xelatex",
"command": "xelatex",
"args": [
  "-synctex=1",
  "-interaction=nonstopmode",
  "-file-line-error",
  "%DOC%"
]
}, {
"name": "pdflatex",
"command": "pdflatex",
"args": [
  "-synctex=1",
  "-interaction=nonstopmode",
  "-file-line-error",
  "%DOC%"
]
}, {
"name": "bibtex",
"command": "bibtex",
"args": [
  "%DOCFILE%"
]
}],
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk"
],
"editor.wordWrap" : "on" 
}

其中"editor.wordWrap" : "on"  可实现自动换行。用了很多网上其他的JSON设置,都无法写入这句话。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值