安装虚拟环境,jupyter,三剑客
准备工作
在学习Python数据分析前,需要安装:
- 虚拟环境
- jupyter
- 数据分析三剑客: “numpy”, “pandas”, “matplotlib”
安装虚拟环境
在window终端(cmd)中
- pip install virtualenv
- pip install virtualenvwrapper-win
创建虚拟环境并安装jupyter
- 创建一个ipython(Python终端)的虚拟环境
mkvirtualenv ipythonenv - 进入虚拟环境
workon ipythonenv - 安装jupyter
pip install jupyter -i https://pypi.douban.com/simple
(执行这句话会顺带安装ipython)

- 查看
pip freeze (或 pip list)
这里有人或许会有疑问:为什么要在虚拟环境中安装jupyter?在cmd中直接安装不是更方便吗?
个人见解:在虚拟环境中创建的好处是“独立分割空间并且便于管理”
安装数据分析三剑客
pip install numpy pandas matplotlib scipy -i https://pypi.douban.com/simple
(这里使用国内豆瓣的源)
启动jupyter
jupyter notebook

本文介绍了Python数据分析的准备工作,包括安装和使用虚拟环境、创建虚拟环境并安装jupyter、以及在虚拟环境中安装数据分析必备的numpy、pandas和matplotlib库。通过虚拟环境,可以实现软件环境的隔离,便于管理和升级。最后,文章还讲解了如何启动jupyter notebook。
5523

被折叠的 条评论
为什么被折叠?



