install_Ubuntu_en.md 7.1 KB
Newer Older
1
# **Install on Ubuntu**
2

3
## Environment preparation
4

5 6 7 8 9 10
* **Ubuntu version (64 bit)**
    * **Ubuntu 14.04 (GPU version supports CUDA 10.0/10.1)**
    * **Ubuntu 16.04 (GPU version supports CUDA 9.0/9.1/9.2/10.0/10.1)**
    * **Ubuntu 18.04 (GPU version supports CUDA 10.0/10.1)**
* **Python version 2.7.15+/3.5.1+/3.6/3.7 (64 bit)**
* **pip or pip3 version 9.0.1+ (64 bit)**
11

12
### Note
13 14


15 16
* You can use `uname -m && cat /etc/*release` view the operating system and digit information of the machine
* Confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python
17

18
    * If you are using Python 2, use the following command to output Python path. Depending on the environment, you may need to replace Python in all command lines in the description with specific Python path
19

20
        which python
21

22
    * If you are using Python 3, use the following command to output Python path. Depending on the environment, you may need to replace Python 3 in all command lines in the description with Python or specific Python path
23

24
        which python3
25

26 27
* You need to confirm that the version of Python meets the requirements
    * If you are using Python 2,use the following command to confirm it is 2.7.15+
28

29
        python --version
30

31
    * If you are using Python 3,use the following command to confirm it is 3.5.1+/3.6/3.7
32

33
        python3 --version
34

35
* You need to confirm that the version of pip meets the requirements, pip version is required 9.0.1+
36

37
    * If you are using Python 2
38

39
        python -m ensurepip
40

41
        python -m pip --version
42

43
    * If you are using Python 3
44

45
        python3 -m ensurepip
46

47
        python3 -m pip --version
48

49
* Confirm that Python and pip is 64 bit,and the processor architecture is x86_64(or called x64、Intel 64、AMD64)architecture. Currently, PaddlePaddle doesn't support arm64 architecture. The first line below outputs "64bit", and the second line outputs "x86_64", "x64" or "AMD64" :
50

51
    * If you are using Python 2
52

53
        python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
54

55
    * If you are using Python 3
56

57
        python3 -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
58

59
* The installation package provided by default requires computer support for MKL
T
tianshuo78520a 已提交
60
* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), please refer to[here](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md).
61

62
## Choose CPU/GPU
63

64
* If your computer doesn't have NVIDIA® GPU, please install CPU version of PaddlePaddle
65

66
* If your computer has NVIDIA® GPU, and meet the following conditions, we command you to install PaddlePaddle
T
tianshuo78520a 已提交
67 68
    * **CUDA toolkit 10.0 with cuDNN v7.6+(for multi card support, NCCL2.3.7 or higher)**
    * **CUDA toolkit 9.0 with cuDNN v7.6+(for multi card support, NCCL2.3.7 or higher)**
69
    * **Hardware devices with GPU computing power over 1.0**
70

71

72
    You can refer to NVIDIA official documents for installation process and configuration method of CUDA and cudnn. Please refer to[CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/),[cuDNN](https://docs.nvidia.com/deeplearning/sdk/cudnn-install/)
73

74
* If you need to use multi card environment, please make sure that you have installed nccl2 correctly, or install nccl2 according to the following instructions (here is the installation instructions of nccl2 under ubuntu 16.04, CUDA9 and cuDNN7). For more version of installation information, please refer to NVIDIA[official website](https://developer.nvidia.com/nccl):
75 76


77 78 79
    wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
    dpkg -i nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
    sudo apt-get install -y libnccl2=2.3.7-1+cuda9.0 libnccl-dev=2.3.7-1+cuda9.0
80 81 82



83
## Choose an installation method
84

85
Under the Ubuntu system, we offer 5 installation methods:
86

87 88 89 90 91
* Pip installation (recommended)
* [Conda安装](./install_Conda.html)
* [Docker installation](./install_Docker.html)
* [Source code compilation and installation](./compile/compile_Ubuntu.html#ubt_source)
* [Docker source code compilation and installation](./compile/compile_Ubuntu.html#ubt_docker)
92

93
We will introduce pip installation here.
94

95
## Installation steps
96

97 98 99
* CPU version of PaddlePaddle:
  * For Python 2: `python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple` or `python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple`
  * For Python 3: `python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple` or `python3 -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple`
100

101 102 103
* GPU version PaddlePaddle:
  * For Python 2: `python -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple` or `python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple`
  * For Python 3: `python3 -m pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple` or `python3 -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple`
104

105
You can [verify whether the installation is successful](#check), if you have any questions please see [FAQ](./FAQ.html)
106

107
Note:
108

109
* For python2.7, we recommend to use `python` command; For python3.x, we recommend to use `python3` command.
110

111
* `python -m pip install paddlepaddle-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple` This command will install PaddlePaddle supporting CUDA 10.0 cuDNN v7, if you have different requirement to the version of CUDA or cuDNN, you can use `python -m pip install paddlepaddle-gpu==[version number] -i https://pypi.tuna.tsinghua.edu.cn/simple` or  `python3 -m pip install paddlepaddle-gpu==[version number] -i https://pypi.tuna.tsinghua.edu.cn/simple` command to install, for version number please see[version number](https://pypi.org/project/paddlepaddle-gpu#history), for correspondence between paddlepaddle and CUDA and cuDNN version, please see [Installation package list](./Tables.html#whls)
112 113


114
* Download the latest stable installation package by default. For development installation package, please refer to[here](./Tables.html#ciwhls)
115

116
<a name="check"></a>
117 118 119
<br/><br/>
## ***Verify installation***

120
    After the installation is complete, you can use `python` or `python3` to enter the Python interpreter and then use `import paddle.fluid as fluid` and then  `fluid.install_check.run_check()` to verify that the installation was successful.
121

122
    If `Your Paddle Fluid is installed succesfully!` appears, it means the installation was successful.
123 124 125 126 127 128 129 130 131

<br/><br/>
## ***How to uninstall***

Please use the following command to uninstall PaddlePaddle (users who use Docker to install PaddlePaddle should use the following command in the container containing PaddlePaddle. Please use the corresponding version of pip):

* ***CPU version of PaddlePaddle***: `pip uninstall paddlepaddle` or `pip3 uninstall paddlepaddle`

- ***GPU version of PaddlePaddle***: `pip uninstall paddlepaddle-gpu` or `pip3 uninstall paddlepaddle-gpu`