pytorch安装笔记

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 

conda create -n your_env_name python=X.X(2.7、3.6、3.8等)

conda activate your_env_name

pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116

pip install ipykernel
python -m ipykernel install --user --name your_env_name


import torch
print(torch.__version__)
print('gpu:',torch.cuda.is_available())

pip install -r requirements.txt

jupyter kernelspec remove xxxx
conda remove -n xxxx --all


发现anaconda装的库再jupyter里面没法跑

更新
conda update -n base --override-channels -c defaults conda
conda install nb_conda




conda activate my-conda-env    
conda install ipykernel
conda deactivate

conda activate base      # could be also some other environment
conda install nb_conda_kernels
jupyter notebook


tmux kill-server 



tmux kill-session -a:当前在某个session内,用于kill 除当前session外,其他所有sessions。
tmux kill-session -t :kill某个特定的session(可以用tmux list-sessions查看当前所有sessions)。
pkill -f tmux:需要sudo权限,会连带清除所有其他users的sessions,慎用。
tmux kill-server:清除之后会出现server exited unexpectedly的错误,慎用。

https://blog.csdn.net/qq_51392112/article/details/129758113
tmux lost server

requirement文件如果有一项找不到库,就不能完成,所以要把出错的项目删掉

wget失败的时候
wget --no-check-certificate http://github.com/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值