How to Install "Python3-mpi4py" package on Linux?
Last Updated :
07 Mar, 2022
Mpi4py is a Python package that implements the Message Passing Interface (MPI) standard. It is built on top of the MPI specification and provides an API based on the standard MPI-2 C++ bindings. This library may be installed using both the pip manager and the apt packager. Python2 and Python3 are supported via the Mpi4py package. It supports convenient communication of any pickable python object, fast communication, parallel input and output, dynamic process management, etc. The Mpi4py library will be installed on the Linux system in this article.
Installing mpi4py package on Linux using PIP
Requirements:
To install the mpi4py package in Linux follow the following steps:
Step 1: First we set the Python3 environment in Linux operating system. So for the installation process, we will use apt manager.
sudo apt-get install python3

Step 2: Now the next important step is to install the PIP manager in our system. It is a package installation program in Python whose main purpose is to install and manage Python packages. So for the installation run the following command on the terminal.
sudo apt install python3-pip

Step 3: Now, we use pip manager to install the mpi4py package. So follow the below command to install the mpi4py package.
sudo pip3 install mpi4py
or
sudo apt install python3-mpi4py

Verifying mpi4py package installation on Linux using PIP
After installing the package, the next main step is to verify the installation of the mpi4py package. So in this step, we are just retrieving the information of the installed package (mpi4py) with the below command on the terminal itself.
python3 -m pip show mpi4py
The below output will be displayed after successful installation of the mpi4py package on your Linux machine.
Similar Reads
How to Install Python-numba package on Linux? Numba package translates Python functions to optimized machine code at runtime using the industry-standard LLVM compiler library. Numba-compiled numerical algorithms in Python can approach the rates of C or FORTRAN. So, in this article, we will be installing the Numba package in Python on Linux oper
1 min read
How to Install python3-xlib package on Linux? The Python3-xlib Library is intended to be a fully functional X client library for Python programs. It is written entirely in Python language, indifference to earlier X libraries for Python (the ancient X extension and the newer plxlib) which were interfaces to the C Xlib. So, in this article, we wi
2 min read
How to Install Packages in Python on Linux? To install a package in python, we use pip. The pip is a python package manager. In this tutorial, we will be discussing how we can install packages in python on a Linux system. To install packages in python on Linux, we must have python and pip installed on our Linux machine. As python comes preins
2 min read
How to Install python-YAML package on Linux? PyYAML is a special Python library for the package that is often used for the configuration of files and also can be used for data exchange purposes. PyYAML package is a Python YAML parser that permits the user to write YAML data and also parse it. PyYAML library is quite similar to the JSON library
2 min read
How to Install Python-web2py package on Linux? Web2py is a Python package that helps web developers to create dynamic online content. Although a web developer may construct a form from scratch if necessary, Web2py is meant to assist decrease tiresome web development activities like building web forms from scratch. So, in this article, we'll use
2 min read