Modulenotfounderror: no module named setuptools_rust (Solution )

Modulenotfounderror_ no module named setuptools_rust (Solution )

Modulenotfounderror: no module named setuptools_rust error occurs when setuptools package is not properly installed or missing from the system. Actually when we need to install the python package from the source code. We need to build it with file. The is dependent on setuptools or distutils. Mostly in the new upgrades of the python package developers are using setuptools in the place of distutils. Mostly because of this migration or some other reasons if the setuptools  is not installed in the system and then run the file, we get this error.

Let’s see how can we fix up this no module named setuptools_rust error.

Modulenotfounderror: no module named setuptools_rust (Solution ) –

The direct solution is to install setuptools or upgrade the existing one.

Solution 1 : ( Re) Install the setuptools –

Usually, setuptools come by default with a pip package manager. But sometimes because of misconfiguration, we have to reinstall the package externally. Here is the command for the same.

pip install setuptools

If you want to install the setuptools package and facing an error with it. Firstly, Uninstall and reinstall the same. In order to reinstall the same. Use the below command.

pip uninstall setuptools

Then run the above command for installation again.

Modulenotfounderror no module named setuptools_rust
Modulenotfounderror no module named setuptools_rust


Solution 2: Upgrading setuptools –

The below command will upgrade the current version of setuptools. Please follow the below command for that.

pip install --upgrade setuptools

Sometimes version mismatch causes incompatibility between packages. If we upgrade them, It becomes compatible.

Alternative commands –

If the above mention direct commands are not working because of platform dependency, Try the below one with platform specification.

Linux platform –

pip install -U pip setuptools

Windows Platform –

python -m pip install -U pip setuptools

Mac Platform –

pip install -U pip setuptools


Note –

  1. Linux user may use try the below command. But make sure it is specific to the Linux platform only.
sudo apt-get install python3-setuptools

2. Since pip and setuptools ate related then we can also upgrade them with a single command.

python3 -m pip install --upgrade pip setuptools wheel

Data Science Learner Team

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

Meet Abhishek ( Chief Editor) , a data scientist with major expertise in NLP and Text Analytics. He has worked on various projects involving text data and have been able to achieve great results. He is currently manages, where he and his team share knowledge and help others learn more about data science.
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner