1.安装Python
第一步:
第二步:选择安装包进行下载
第三步:安装安装包,并在终端进行检验:输入Python
第四步:终端退出Python命令行:使用 quit(), exit(), 或者Command+d,或者Command+z退出命令行。
2.安装Anaconda
第一步:
第二步:
第三步:
第四步:下载安装包(选择对应的系统)
第五步:安装anaconda且运行
3.新建开发环境、安装jupyter-notebook
第一步:运行anaconda,在环境中运行点开终端运行
第二步:
a.创建名为imooc_ai的环境: conda create -n imooc_ai
b.提示是否需要继续执行:输入y
c.激活imooc_ai环境:输入 conda activate imooc_ai
第三步:切换回Ancona界面找到imooc_ai环境
第四步:安装jupyter notebook
第五步:jupyter notebook安装完成,点击登录
第六步:登录后jupyter notebook界面
第七步: jupyter notebook 界面优化
进入网址:https://github.com/dunovank/jupyter-themes
第八步:回到终端界面安装jupyterthemes工具库:输入 pip install jupyterthemes -i https://pypi.tuna.tsinghua.edu.cn/simple
此时下载速度比较慢,找到国内下载源,提高速度,所以可以百度搜索Python 源
个人推荐清华大学pypi镜像站 https://pypi.tuna.tsinghua.edu.cn/simple
根据新的下载源在终端重新输入原命令加上 -i 下载源
pip install jupyterthemes -i https://pypi.tuna.tsinghua.edu.cn/simple
第九步:安装成功:
第十步:测试是否安装成功:输入命令 jt -h 查看帮助文档
第十一步:进行设置:输入:jt -t grade3 -f fira -fs 16 -cellw 90% -ofs 11 -dfs 11 -T
第十二步:查看设置效果:
jupyter原界面:
jupyter新界面:
第十三步:创建ipynb文件
第十四步: 进行文件重命名
第十五步:将文件重命名为basic_coding
第十六步:编辑basic_coding
模块库引用:在百度上搜索 Python自带库
https://docs.python.org/zh-cn/3/library/