perfectism's blog

物来顺应,未来不迎,当时不杂,既往不恋

0%

环境配置常见问题

环境配置常见问题

hexo博客

sh deploy.sh出现 spawn failed

执行

1
ssh -T git@github.com

公式无法正常显示

https://blog.csdn.net/weixin_44489823/article/details/105028860

Anaconda

1.重置源

1
conda config --remove -key channels

2.删除清华镜像:删除 .condarc中的defaults

2.管理员运行conda prompt

1
2
3
4
5
6
#conda update 
conda update anaconda-navigator
anaconda-navigator --reset
conda update anaconda-client
conda update -f anaconda-client
anaconda-navigator #命令行启动Navigator

PyTorch

1
No module named 'torchtext'

办法:

1
pip install https://github.com/pytorch/text/archive/master.zip

tqdm模块
tqdm是一个快速、扩展性强的进度条工具库,
其githup地址:https://github.com/tqdm/tqdm

办法:

1
2
3
pip install tqdm
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
#ouput cpu

Jupyter Lab

载入py文件

1
%load test.py

CUDA cudnn

CUDA 10.1

cudnn 7.6.3

使用特定源安装

1
pip install tensorflow-gpu==1.8 -i https://pypi.tuna.tsinghua.edu.cn/simple

升级pip

1
python -m pip install -U pip

tensorflow与keras间的兼容

https://docs.floydhub.com/guides/environments/

Linux

解压zip

1
unzip test.zip

解压7z

1
2
apt-get install p7zip
7z x test.7z

详见 https://blog.csdn.net/AC_huang/article/details/23279641

展示文件树状结构

1
2
sudo apt-get install tree
tree --dirsfirst --filelimit 50

命令行退出python

1
quit()

matlab

匿名函数求导后,求某点值

1
2
3
4
5
syms y
f=@(x) 2*x^2+3;
diff=diff(f(y))
diff=matlabFunction(diff)
diff(0.5)