Importerror no module named sysconfig : Get Solution Here

Importerror no module named sysconfig

Importerror no module named sysconfig error usually comes when python-setuptools is not installed or path is not set properly. In this article, We will see how to install or reinstall the python-setuptools.


Importerror no module named sysconfig : ( Fix ) –

sysconfig is the module of python-setuptools package. Hence if the python-setuptools is not properly installed and we invoke the sysconfig module in our code. We get the same error (Importerror no module named sysconfig ). Let’s see the installation command for python-setuptools package.

python-setuptools Installation –

Firstly, please use the below command.

yum install python-setuptools

Secondly, Please make sure that you should remove the pkg_resources folder from site-packages.

rm /usr/lib/python(version)/site-packages/pkg_resources*

After you need to run the below command.

pip --version
pip (pip_version) from /usr/lib/python(version)/site-packages (python version)

Here the pip_version and python version are configurational parameter. We may change it at our convenience. One more important thing the above commands are Linux oriented.

Most importantly, The setuptools gives a complete finishing for packaging a python project. It is a tool to formally build and distribute the python packages among the developers and end-users.

Importerror no module named sysconfig
Importerror no module named sysconfig

Real Scenarios for (no module named sysconfig) :

  1. In most of the cases where we use pip on a RedHat Server system. we get the same error. Usually because of the default python version of OS ( Linux ) and the version which we externally install.
  2. Not only in RedHat OS but  CentOS has the same issue with this cause.
  3. Python 2.7.11, Anaconda 2.4.1 (64-bit). No admin permissions for local install. Actually, this is another reason for the above error. Hence if we use virtualenv here for dependency installation. We may easily fix the issue because now it will not be for each user.


To sum up, I hope you must like this article. If you have any doubt and suggestions please comment below in the comment box.  Our team will connect with you.


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