一、传统安装
Jupyter for Windows 安装
Jupyter 的安装需要 ipython
升级ipython
1 | pip install ipython --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 Jupyter
1 | pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装完后会提醒安装路径,一般是在
python
目录下的Script
我的 Jupiter 目录:
C:\Users\Gavin\AppData\Local\Programs\Python\Python38\Scripts
运行jupyter-notebook.exe
即可
二、机器学习python依赖包的下载(Windows)
更新 pip
1 | python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 scipy
1 | pip install scipy -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 matplotlib
1 | pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 numpy
1 | pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 pandas
1 | pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 scikit-learn
1 | pip install scikit-learn -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
安装 tensorflow
1 | pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple/ |
卸载依赖包
格式:pip uninstall XXX
二、anaconda 环境
1. 安装 anaconda
下载对应版本即可【注意:安装时勾选自动配置环境变量
能省事】
1 | https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ |
2. 添加 JupyterLab 图标
- 右击
Jupyter Notebook
打开文件位置
- 复制粘贴,创建一个
Jupyter Notebook 副本
- 把
notebook
更改为lab
即可
- 最后为了分辨,可以去图标网站上找一个图标,自用图标
3. 安装 graphviz
方法1:
验证:
windows 命令行界面,输入dot -version
注意:
- 勾选自动配置环境变量PATH
方法2:
1 | conda install graphviz |
出现问题:
查看包的安装地址
1 | import 包 |
解决方案:
添加环境变量,例如:D:\Anaconda3\Library\bin\graphviz
出现问题2:
解决方案1:
解决方案2:
安装老版本:(老版本下载链接:链接:https://pan.baidu.com/s/1ExisBC8gyMcH1eI9fpMDtQ 提取码:qzeh