Ubuntu 16.04 安装Anaconda3
2017-06-21 23:31
316 查看
1 什么是Anaconda
Anaconda是集成了各种Python数据科学计算包的项目,免去开发者手工配置各种依赖包的麻烦。2 下载
安装包可以从Anaconda官网下载,目前提供了基于Python2.7和Python3.6版本安装包供选择。然而国内的网络环境从官网链接下载奇慢无比,推荐从国内的开源镜像站下载,如清华大学开源软件镜像站,这里我选择下载Anaconda3-5.0.0-Linux-x86_64.sh。
3 安装
直接按照官方指南操作即可。在安装包所在目录执行命令,按
Enter继续。由于我需要安装在
/opt目录,所以加上了
sudo
hj@hj-ubuntu:~/Downloads$ sudo bash Anaconda3-5.0.0-Linux-x86_64.sh Welcome to Anaconda3 5.0.0 In order to continue the installation process, please review the license agreement. Please, press ENTER to continue >>>
接下来提示一些授权信息,输入
yes继续。
Do you accept the license terms? [yes|no] [no] >>> yes
接下来指定安装目录,不指定的话会安装到默认路径下。
Anaconda3 will now be installed into this location: /home/hj/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/hj/anaconda3] >>> /opt/anaconda3
然后稍等一会,提示是否要将Anaconda的安装路径添加到PATH环境变量中,输入
yes就好了。
installation finished. Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/hj/.bashrc ? [yes|no] [no] >>> yes
若输入
no,需要手动在
.bashrc文件中添加以下内容,然后
source ~/.bashrc
export PATH="/opt/anaconda3/bin:$PATH"
至此,Anaconda就安装好了
4 使用
现在在终端中启动Python,发现已经替换成Anaconda的Python了$ python Python 3.6.2 |Anaconda, Inc.| (default, Sep 22 2017, 02:03:08) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
输入以下命令可以开启
anaconda-navigator,这里面集成了Anaconda自带的一些工具。
$ anaconda-navigator
可参考官方的Getting started页面进一步探索如何使用Anaconda。
如果使用PyCharm作为IDE,如何设置使用刚刚安装的Anaconda3中的Python作为解释器呢?步骤如下:
在PyCharm中点击:File -> Settings -> Project Interpreter
在齿轮处选择
Add Local,在弹出的对话框中选择对应位置下的python后,点击OK
然后PyCharm需要一段时间来解析、索引对应路径下的依赖包,完成后便可以愉快地用PyCharm写Python了
相关文章推荐
- Ubuntu16.04下安装sublime text3并配置anaconda插件
- Ubuntu16.04安装Anaconda2和Anaconda3
- Ubuntu16.04+cuda8.0+Anaconda2+caffe安装
- Ubuntu 16.04 anaconda安装opencv及python链接
- ubuntu16.04安装Anaconda
- Ubuntu16.04+cuda8.0+opencv3.1+caffe+anaconda安装,双显卡
- Ubuntu 16.04 LTS安装TensorFlow(Anaconda 4.3.1)
- Ubuntu16.04下安装Anaconda,tensorflow以及解决spyder中无法import tensorflow问题
- ubuntu16.04下安装opencv3.1+anaconda2+caffe
- Ubuntu 16.04下安装Cuda 8.0, Anaconda 4.4.0和TensorFlow 1.2.1
- 配有Tesla K40c的服务器新装Ubuntu16.04并安装CUDA8.0、Anaconda3、Matlab2016a、OPENCV3.1、CuDNN5.1、MXNet
- ubuntu16.04安装anaconda(阿里云下)
- Ubuntu16.04+cuda8.0+opencv3.1+anaconda2.7+caffe安装教程
- [置顶] caffe安装ubuntu16.04 opencv2.4.13 anaconda2
- ubuntu 16.04 Anaconda+cuda+theano 深度学习框架安装
- [bigdata-34] pyenv + anaconda 4.2 + python3.5+ ubuntu 16.04 安装
- Ubuntu16.04+Anaconda 安装GPU版本tensorflow
- Ubuntu16.04 安装xgboost(anaconda3)
- Ubuntu16.04安装Anaconda
- ubuntu16.04安装anaconda(python2.7 版本)