Press "Enter" to skip to content

NTU20220813-数据结构化和深度学习-WSL音频转发

 

https://zhuanlan.zhihu.com/p/232271603

 

https://www.proschoolonline.com/blog/data-science-interview-questions-on-linear-regression

 

https://orangedatamining.com/download/#windows

 

orange右键即可找到想要的东西。

 

安装R语言

 

linux的R安装好后,

 

输入R进入R命令行

 

输入如下命令

 

首先更换清华源

 

在~/.Rprofile修改内容如下

 

options(repos=structure(repos="http://mirror.bjtu.edu.cn/",
        BioC_mirror="http://mirrors.ustc.edu.cn/bioc/")

 

发现没有什幺用,修改profile并不行,因为我在命令行查看,得到了如下结果

 

 

 

#使用命令行设置镜像
options()$repos  
## 查看使用install.packages安装时的默认镜像
options()$BioC_mirror 
##查看使用bioconductor的默认镜像
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/") 
##指定镜像,这个是中国科技大学镜像
options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")) 
##指定install.packages安装镜像,这个是清华镜像

 

这下子才算修改成功了

 

但是一重新登录进R啥都没了

 

进入到R的库目录

 

这才是那个所谓的profile

 

cd /usr/lib/R/etc
sudo cp Rprofile.site Rprofile.site.bak
sudo vi Rprofile.site

 

修改如下

 

# set a CRAN mirror 
local({
 
    r <- getOption("repos")
    r["CRAN"] <- "http://mirrors.tuna.tsinghua.edu.cn/CRAN/"
    options(repos = r)
})

 

这下子源才是真正改了。

 

package ‘pbdZMQ’ is not available (for R version 3.4.4)

 

不能自动安装依赖,实在是一大痛点!

 

想用biocLite安装

 

Error: ‘no packages in repository (no internet connection?)’ while trying

 

http://mirrors.ustc.edu.cn/bioc/packages/3.6/bioc

 

install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec(user = FALSE)

 

ERROR: dependencies ‘usethis’, ‘pkgdown’, ‘rcmdcheck’, ‘rversions’, ‘urlchecker’ are not available for package ‘devtools’

 

然后一堆依赖报错,所以说,还是只有单个单个来,然后看到却依赖,单独安装。

 

不进入内核

 

可以升级R语言

 

参考清华大学的方案即可

 

https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/linux/ubuntu/

 

安装pyAudio在wsl上,貌似对访问摄像头,麦克风有些问题

 

先考虑linux下pyaudio的安装

 

ImportError: libportaudio.so.2: cannot open shared object file: No such file or directory

 

解决办法:原因是pyaudio的pip和apt不匹配

 

sudo apt-get purge --remove python-pyaudio
sudo apt-get install portaudio19-dev
pip install pyaudio

 

wsl实现音频转发

 

sudo apt install pulseaudio
echo 'export PULSE_SERVER=tcp:127.0.0.1' >> ~/.profile

 

https://blog.sandtears.com/2020/02/27/wsl-gui-audio-support.html

 

设置音频转发,下载压缩包,参考这个,却出现了如下报错

 

PS D:\software\pulseaudio-1.1> bin\paplay.exe -p –server=tcp:localhost C:\Windows\Media\ding.wav

 

Connection failure: Connection refused

 

import torch 出现

 

NameError: name ‘nn’ is not defined

 

这个只有重装,最好重新创建一个环境

 

The kernel appears to have died. It will restart automatically.

 

内核死了,我的心死了

 

Some weights of Wav2Vec2ForCTC were not initialized from the model checkpoint at facebook/wav2vec2-base-960h and are newly initialized: [‘wav2vec2.masked_spec_embed’]

 

You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

 

这个其实不用管,就是说一部分权重没有初始化

Be First to Comment

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注