anaconda/jupyter-notebook 安装及Windows/Linux多版本设置
2017-11-28 15:30
991 查看
安装
首先需要主anaconda版本,如anaconda3,下载地址下载地址 : https://www.anaconda.com/download/
windows直接下载后进行安装,安装时注意将环境变量添加到电脑的地方打上勾。
Linux安装的话,切换到安装包(sh后缀的文件)目录,运行
bash ./Anaconda3-x.x.x-Linux-x86_64.sh,x.x.x是下载对应的版本名称。
官网Linux版本安装指导 : https://docs.anaconda.com/anaconda/install/linux
安装完成后可以看到jupyter notebook和spyder都安装好了
安装完成后确认是否已经将其添加进环境变量,在命令行中运行
python即可。没有的话添加一下,具体方法请自行搜索。
Windows
Linux
安装另外版本
下面的方法Windows和Linux通用。Linux用Ctrl+Alt+T打开终端运行下面命令命令,Windows打开
cmd运行命令。
更换版本前,强烈建议将镜像源配置好,这样下载速度会快很多,下面给出了清华源的设置命令。
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 --set show_channel_urls yes
安装额外运行如下命令:
conda create -n py27 python=2.7 # 此处py27是自定义命名,名称一旦确认,下面的命令需与此处一致
conda install -n py27 jupyter # 安装 jupyter notebook conda install -n py27 spyder # 安装 Spyder
安装完成后,打开notebook可以看到新建按钮出现了python2
如果没有出现,运行下面代码则会出现python2。
source activate py27 # 激活python2 jupyter notebook # 打开notebook
各版本中安装“包”的方法
anaconda已经默认安装了很多常用python包,如果要在主版本中(上述的python3版本)安装,直接使用pip即可。如 安装
pandas, 运行命令
pip install pandas
如果需要在新版本中安装(上述python2版本),命令如下:
首先切换到对应版本
Linux方法如下:
source activate py27 pip install xxx # xxx为python包名称
Windows方法如下:
activate py27 pip install xxx
最后,说一下,我电脑使用的windows7,Linux使用的Ubuntu 16,运行上述命令很顺利,没有出现错误。
如果大家出现问题,建议参考下面几个链接。
参考链接:
http://blog.csdn.net/vincentluo91/article/details/70826859
https://www.cnblogs.com/lemonbit/p/7096541.html
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ 软件下载源设置
相关文章推荐
- windows下安装双版本anaconda,以及配置jupyter notebook的kernel
- windows下安装双版本anaconda,以及配置jupyter notebook的kernel
- Windows10内置安装Ubuntu系统 安装Anaconda jupyter notebook
- windows 子系统 linux (WLS):jupyter notebook 安装
- win10下Anaconda 2 和 3 共存安装,并切换jupyter notebook和Pycharm中的对应版本
- windows下安装jupyter notebook
- ubuntu下安装Anaconda后打不开ipython notebook (jupyter notebook)
- win10安装anaconda,nb_conda (jupyter notebook extension) 装不上的解决方法
- jupyter notebook 安装多个版本kernel(python2 和python3)
- Windows下的Jupyter Notebook 安装与自定义启动
- 为anaconda的jupyter notebook设置初始化目录
- Windows下的Jupyter Notebook 安装与自定义启动(图文详解)
- windows下安装ipython和jupyter notebook
- Windows, Ubuntu 下 Numpy, Scipy, matplotlib, jupyter notebook 安装配置
- 在centos7服务器上安装anaconda和jupyter notebook
- 深度学习环境搭建:linux下 Ubuntu16.04+cuda8.0+cudnn+anaconda+tensorflow并配置远程访问jupyter notebook
- 基于Anaconda的tensorflow/jupyter notebook/numpy/matplotlib/scipy的安装
- Windows下的Jupyter Notebook 安装与自定义启动(图文详解)
- windows安装python,jupyter notebook
- Anaconda安装配置&jupyter notebook使用