奇奇10/10学习内容:
第零章
1:jupyter notebook 各方面使用待填补。
conda install jupyter notebook
pip install --upgrade pip
具体port:
jupyter notebook --port
配置文件查看:
jupyter notebook --generate-config
在
c.NotebookApp.notebook_dir=''部分进行位置具体填充。
将anaconda和jupyternotebook互通。
在anaconda添加 ipykernel
conda create -n env_name python=3.8 ipykernel
将虚拟环境写进jupyter
python -m ipykernel install --user --name env_name --display-name “env_name”
jupyter 安装插件。(通过anaconda)
anaconda中写入
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install( 将插肩搞入jupyter工具栏)
插件有待下载
execute time
hinterland
也可以在anaconda中用
jupyter labextension install jupyterlab-execute-time 安装插件。
更多操作记录:
head 某文件, 某文件头部东西。
wc计算行数(word count,行数,单词数,字节数。)
which python3 找位置。
lsmagic(?没有试出来)
env profile=dev 设置环境变量。
import os
os.environ.get(“profile”)
timeit 查时间。
sorted(python中何意?)
Built-in magic commands — IPython 8.1.1 documentation
第一章:
pytorch安装。
conda create -n env_name python==3.8 (conda创建虚拟环境命令。)
conda install package_name
conda list (所有安装的包)
conda remove -n env_name --all 删除虚拟环境。
conda activate env_name 激活环境命令
检查是否进入虚拟环境,输入
import torch
torch.cuda.is_available()
torch主要命令: