pytorch、pycharm与tensorflow

**

pytorch

**
jupyter打开方式:
打开Anaconda Prompt,输入activate pytorch,进而输入jupyter notebook。
查看当前环境:conda info --envs
查看库:pip list或者conda list
更新库:pip install --upgrade库名
运行快捷键:shift+enter
安装新的模块:conda install 模块名 pip install 名
在jupyter中打开.py文件:在Home中新建.ipynb文件,并把本机的.py文件上传到notebook中,1.在notebook中新建一个.ipynb文件 2.上传.py文件,使这两个文件在同一文件夹中 3.在新建的.ipynb文件中输入 %load 文件名.py,结果:将.py文件转成.ipynb文件,可编辑运行(可看到源代码)

**

tensorflow

**
查看当前存在的虚拟环境:conda env list
删除虚拟环境:conda remove -n 环境名 --all
查看所有的内核的路径:jupyter kernelspec list
卸载内核:jupyter kernelspec remove 内核名
添加内核:python -m ipykernel install --user --name=kernelname --display-name showname

Python版本:anaconda prompt python -V
python 3.7.6

conda版本:anaconda prompt conda --version
conda 4.10.3

tensorflow版本 (环境变量 tensorflow1)
2.6.0

你可能感兴趣的:(tensorflow,pytorch,pycharm)