1.安装指令,挂了VPN速度更快
proxychains4 pip install nibabel
2.清华镜像源下载库
pip install tensorflow==1.8 -i https://pypi.tuna.tsinghua.edu.cn/simple
3. 复制文件
cp -r 源地址 目的地址
4.迭代删除目录下所有文件
rm -rf 目录
5.查看服务器内存情况,内存不够将会导致传输文件错误甚至新建文件夹失败
df -h
6.查看home目录下谁占用的内存多
sudo -du -sh /home/*
7.创建及删除conda 环境
conda create -n name python=3.8.8
conda remove -n name --all
8. 修改python文件
vim /home/zhenchao/config.py
i进入插入模式
esc推出插入模式
ZZ退出vim
9.查看创建的环境及环境中安装的库
conda info --envs
pip list
10. Segmentation fault(core dumped):分割故障(核心转储)
使用命令 ulimit -a查看core file size是否为0
ulimit -c 1024修改大小
11.xgboost安装问题
proxychains4 pip install xgboost
执行上述指令,发现报错,
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/xgboost/
[proxychains] Strict chain ... 127.0.0.1:1081 ... pypi.org:443 ... OK
ERROR: Could not find a version that satisfies the requirement xgboost (from versions: none)
ERROR: No matching distribution found for xgboost
换成清华源指令安装成功
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xgboost
虽然安装成功了,在xshell和jupyter notebook终端import没问题,但是在cell里用该环境kernel还是引入不了,显示no module named 'xgboost'
在cell里执行如下代码即可:
import sys
!{sys.executable} -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xgboost
再次运行,引入成功!
12.