【Linux】Ubuntu下安装paddlepaddle

**

install using pip

**
First, we use the following commands to check if the environment of this machine is suitable for installing PaddlePaddle:

uname -m && cat /etc/*release

The above command will display the operating system and processing bits of the machine. Please make sure your computer is consistent with the requirements of this tutorial.

Second, your computer needs to meet any of the following requirements:

Python2.7.x (dev), Pip >= 9.0.1
Python3.5+.x (dev), Pip3 >= 9.0.1

You may have installed pip on your Ubuntu. Please use pip -V or pip3 -V to confirm its version is the recommended pip 9.0.1 or higher.

Update apt source: apt update
Use the following command to install or upgrade Python and pip to the required version: (pip and dev installation in python3.6, python3.7 differs greatly across different Ubuntu versions, thus the steps are omitted here)

  • For python2: sudo apt install python-dev python-pip

  • For python3.5: sudo apt install python3.5-dev and curl https://bootstrap.pypa.io/get-pip.py -o - | python3.5 && easy_install pip

    For python3.6, python3.7: We assumed that python3.6 (3.7) and the corresponding versions of dev and pip3 are properly installed by yourself.
    Even if you already have Python 2 or Python 3 in your environment, you need to install Python-dev or Python 3.5 (3.6, 3.7) -dev.

Now let’s install PaddlePaddle:

Use pip install to install PaddlePaddle

For users who need the CPU version PaddlePaddle: pip install paddlepaddle or pip3 install paddlepaddle

For users who need the GPU version PaddlePaddle: pip install paddlepaddle-gpu or pip3 install paddlepaddle-gpu

1.In order to prevent problem “nccl.h cannot be found”, please first install nccl2 according to the following command (here is ubuntu 16.04, CUDA9, ncDNN v7 nccl2 installation instructions), for more information about the installation information, please refer to the NVIDIA official website:

 i. `Wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb`
 ii. `dpkg -i nvidia-machine- Learning-repo-ubuntu1604_1.0.0-1_amd64.deb`
 iii. `sudo apt-get install -y libnccl2=2.2.13-1+cuda9.0 libnccl-dev=2.2.13-1+cuda9.0`

2.If you do not specify the pypi package version number, we will by default provide you with a version of PaddlePaddle that supports Cuda 9/cuDNN v7.

For users with Cannot uninstall ‘six’. problems, the probable reason is the existing Python installation issues in your system. In this case, use pip install paddlepaddle --ignore-installed six(CPU) or pip install paddlepaddle-gpu -- Ignore-installed six (GPU) to resolve.

For users with other requirements: pip install paddlepaddle==[version number] or pip3 install paddlepaddle==[version number]

For the version number, please refer to the latest Release installation package list. If you need to obtain and install the latest PaddlePaddle development branch, you can download and install the latest whl installation package and c-api development package from the latest dev installation package list or our CI system. To log in, click on “Log in as guest”.

Now you have completed the process of installing PaddlePaddle using pip install.

原文链接:https://www.paddlepaddle.org.cn/documentation/docs/en/1.5/beginners_guide/install/install_Ubuntu_en.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值