Anaconda与jupyter安装配置与使用

1、anaconda安装

进入官网下载:
1 进去之后选择与自己电脑版本相匹配的版本下载,比如我的电脑是win10/64位

jupter怎么看python内核 如何查看jupyter版本_jupyter


点击之后下载,下载完成后打开所在文件夹:

jupter怎么看python内核 如何查看jupyter版本_镜像源_02

jupter怎么看python内核 如何查看jupyter版本_python_03


右键,管理员身份运行:

jupter怎么看python内核 如何查看jupyter版本_python_04

jupter怎么看python内核 如何查看jupyter版本_jupyter_05

jupter怎么看python内核 如何查看jupyter版本_jupyter_06

jupter怎么看python内核 如何查看jupyter版本_anaconda_07

jupter怎么看python内核 如何查看jupyter版本_镜像源_08

jupter怎么看python内核 如何查看jupyter版本_jupter怎么看python内核_09

jupter怎么看python内核 如何查看jupyter版本_python_10

jupter怎么看python内核 如何查看jupyter版本_jupyter_11

jupter怎么看python内核 如何查看jupyter版本_jupyter_12

jupter怎么看python内核 如何查看jupyter版本_python_13


点击finish之后会跳出下面的网页,叉掉就可以了

jupter怎么看python内核 如何查看jupyter版本_python_14

2、jupyter安装配置

右键,选择管理员运行:

jupter怎么看python内核 如何查看jupyter版本_python_15


运行后显示如下界面,并点击:

jupter怎么看python内核 如何查看jupyter版本_python_16


点击后会自动跳转到jupyter:

jupter怎么看python内核 如何查看jupyter版本_镜像源_17

3、使用jupyter

通过cmd检查Python的版本是否是3.8,出入exit()退出:

jupter怎么看python内核 如何查看jupyter版本_anaconda_18


查看版本:

jupter怎么看python内核 如何查看jupyter版本_python_19


在jupyter创建项目进行测试:

jupter怎么看python内核 如何查看jupyter版本_jupter怎么看python内核_20


然后进入如下界面:

jupter怎么看python内核 如何查看jupyter版本_镜像源_21


点击Untitle1对项目进行重命名:

jupter怎么看python内核 如何查看jupyter版本_anaconda_22


然后就可以输代码,写完点击运行就可以啦:

jupter怎么看python内核 如何查看jupyter版本_anaconda_23


注释方法:

按ESC—>按大写字母M—>输入注释内容—>点运行:

jupter怎么看python内核 如何查看jupyter版本_python_24

jupter怎么看python内核 如何查看jupyter版本_镜像源_25


也可以通过#进行注释:

jupter怎么看python内核 如何查看jupyter版本_python_26

4、快捷键

Enter : 转入编辑模式
Shift-Enter : 运行本单元,选中下个单元
Ctrl-Enter : 运行本单元
Alt-Enter : 运行本单元,在其下插入新单元
Y : 单元转入代码状态
M :单元转入markdown状态
R : 单元转入raw状态
Tab : 代码补全或缩进
Shift-Tab : 提示
Ctrl-] : 缩进
Ctrl-[ : 解除缩进
Ctrl-A : 全选
Ctrl-Z : 复原
Esc : 进入命令模式
Ctrl-M : 进入命令模式

5、添加镜像源

没配置前先查看一下:

conda config --get channels

jupter怎么看python内核 如何查看jupyter版本_镜像源_27

删除之前的镜像源回复默认:

conda config --remove-key channels

添加清华的镜像源,依次执行命令

#添加镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2

#显示检索路径
conda config --set show_channel_urls yes

#显示镜像通道
conda config --show channels

执行完显示如下就成功啦

jupter怎么看python内核 如何查看jupyter版本_python_28

6、模块的安装与卸载

安装卸载都需要在pip前面加 ! 号
比如安装numy模块

!pip install numpy

jupter怎么看python内核 如何查看jupyter版本_anaconda_29

7、anaconda的卸载

由于我之前安装过anaconda,所以我是先卸载后再重新下载的
右键anaconda快捷方式,选择打开文件所在位置,双击Uninstall-Anaconda3.exe

jupter怎么看python内核 如何查看jupyter版本_jupter怎么看python内核_30

jupter怎么看python内核 如何查看jupyter版本_镜像源_31


jupter怎么看python内核 如何查看jupyter版本_anaconda_32

8、总结

anaconda 是一个python的发行版,包括了python和很多常见的软件库, 和一个包管理器conda,对于初学者还是很友好的,使用起来方便简单。anaconda的安装也比较简单的,大家如果哪一步出现了问题可以发表在评论区呀。