modulenotfounderror no module named setuptools-rust

modulenotfounderror no module named setuptools-rust


I got the error ‘modulenotfounderror no module named setuptools-rust’ while trying to import the module in python3. Follow the below steps to fix the error.

1. Log into your Linux server via SSH

2. setuptools-rust can be installed using pip

3. Run the command ‘pip3 install setuptools-rust’

4. Import setuptools-rust to confirm it is installed correctly

ModuleNotFoundError No module named setuptools_rust

ModuleNotFoundError No module named setuptools_rust


First check the version of Python installed on your server.

[root@centos /]# python3 -V
Python 3.6.8

The below command checks whether python-pip package is installed or not :

[root@centos /]# rpm -qa | grep -i pip


[root@centos /]# pip3 -V
pip 21.3.1

Run the command ‘yum install python-pip’ OR ‘yum install python3-pip’ to install python-pip package on your CentOS server.

pip is the package installer for Python. To install setuptools-rust using pip:

# pip3 install setuptools-rust

Import setuptools-rust to make sure it is installed correctly.

[root@centos /]# python3
Python 3.6.8 (default, Nov 21 2019, 19:31:34)
[GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import setuptools-rust

OR you can run ‘pip3 freeze | grep -i setuptools-rust’ to confirm

[root@centos /]# pip3 freeze | grep -i setuptools-rust

Follow the below steps if you want to install a specific version of setuptools-rust

Example :

#pip3 install setuptools-rust==1.1.0

The above command will install setuptools-rust version 1.1.0.