Jupyter Notebook 安装使用
- 安装 python(略)
- 安装 python 虚拟环境
> pip install virtualenv -i https://pypi.tuna.tsinghua.edu.cn/simple/
这里用 -i 参数指定了国内源,方便快速下载
- 创建虚拟环境
> virtualenv -p python3 py3
这里创建的是 python 3 的虚拟环境,目录名叫py3
- 启动 python 虚拟环境
> source py3/bin/activate
- 在虚拟环境中安装jupyter
(py3)> pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple/
- 安装所需的python库
(py3)> pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/ (py3)> pip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple/ (py3)> pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/ (py3)> pip install sklearn -i https://pypi.tuna.tsinghua.edu.cn/simple/
- 创建目标目录并进入
(py3)> mkdir algorithm (py3)> cd algorithm
- 启动jupyter notebook
(py3)> jupyter notebook
默认启动端口为8888,复制链接后可以通过浏览器访问。



