1. You can use the following command to view the operating system and bit information of the machine:
uname -m && cat /etc/*release
2. Check the python version, use the following command to confirm that it is 3.6/3.7/3.8/3.9
python --version
Linux python3 installation_ur home's blog-CSDN blog
3. It is necessary to confirm whether the pip version meets the requirements, and the pip version is required to be 20.2.2 or later
python -m ensurepip
python -m pip --version
4. It is necessary to confirm that Python and pip are 64bit, and the processor architecture is x86_64 (or x64, Intel 64, AMD64) architecture, currently PaddlePaddle does not support arm64 architecture. The output of the first line below is "64bit", and the output of the second line is "x86_64", "x64" or "AMD64":
python -c "import platform;print(platform.architecture()[0]);print(platform.machine())"
5. PaddlePaddle for CPU
python -m pip install paddlepaddle==2.2.1 -i https://mirror.baidu.com/pypi/simple
ModuleNotFoundError: No module named '_ctypes' appears during installation, solve the reference blog
6. The installation is successful, enter import paddle, the following error is displayed
Error: Can not import avx core while this file exists: /usr/local/python3/lib/python3.7/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/python3/lib/python3.7/site-packages/paddle/__init__.py", line 25, in <module>
from .fluid import monkey_patch_variable
File "/usr/local/python3/lib/python3.7/site-packages/paddle/fluid/__init__.py", line 36, in <module>
from . import framework
File "/usr/local/python3/lib/python3.7/site-packages/paddle/fluid/framework.py", line 37, in <module>
from . import core
File "/usr/local/python3/lib/python3.7/site-packages/paddle/fluid/core.py", line 294, in <module>
raise e
File "/usr/local/python3/lib/python3.7/site-packages/paddle/fluid/core.py", line 256, in <module>
from .core_avx import *
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/local/python3/lib/python3.7/site-packages/paddle/fluid/core_avx.so)
Question 1 Can not import avx core while this file exists Solve the reference blog
Question 2 ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found Solution reference blog
libstdc++.so.6.0.24 resource pack download_a-small-dinosaur's Blog-CSDN Blog
http://ai.baidu.com/forum/topic/show/983545
7. success
import paddle
>>> import paddle
/usr/local/python3/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:943: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
collections.MutableMapping.register(ParseResults)
/usr/local/python3/lib/python3.7/site-packages/pkg_resources/_vendor/pyparsing.py:3226: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
elif isinstance( exprs, collections.Iterable ):
/usr/local/python3/lib/python3.7/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
paddle.utils.run_check()
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ...
PaddlePaddle works well on 1 CPU.
W1224 11:50:41.558108 18713 fuse_all_reduce_op_pass.cc:76] Find all_reduce operators: 2. To make the speed faster, some all_reduce ops are fused during training, after fusion, the number of all_reduce ops is 2.
PaddlePaddle works well on 2 CPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.
Documentation reference
Get Started_Flying Paddle - an open source deep learning platform derived from industrial practice