纯净版的Ubuntu系统,需要跟新软件源才能安装软件
apt-get update
更新完成之后就可以安装了
1:安装wget
apt-get install wget
2:安装Anaconda
conda简介
Conda 是一个开源的软件包管理系统和环境管理系统,用于安装多个版本的软件包及其依赖关系,并在它们之间轻松切换。 Conda 是为 Python 程序创建的,适用于 Linux,OS X 和Windows,也可以打包和分发其他软件。
下载anaconda
wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
安装(根据自己的情况输入yes或者no)
root@550b46f111c4:/downloads# bash Anaconda3-4.4.0-Linux-x86_64.sh.1 Welcome to Anaconda3 4.4.0 (by Continuum Analytics, Inc.) In order to continue the installation process, please review the license agreement. Please, press ENTER to continue >>> yes cryptography A Python library which exposes cryptographic recipes and primitives. Do you approve the license terms? [yes|no] >>> yes Anaconda3 will now be installed into this location: /root/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/root/anaconda3] >>> yes #指定安装的目录 Do you wish the installer to prepend the Anaconda3 install location to PATH in your /root/.bashrc ? [yes|no] [no] >>> yes
生效环境变量
root@550b46f111c4:/downloads# source ~/.bashrc
查看列表
root@550b46f111c4:/downloads# conda list
手动添加环境变量
root@550b46f111c4:/downloads#vim ~/.bashrc #最后一行添加 export PATH="/home/用户名/anaconda3/bin:$PATH" #生效 root@550b46f111c4:/downloads#source ~/.bashrc
3:安装python
root@550b46f111c4:/downloads# apt-get install python3-pip