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.
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.
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.
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.
Thanks
Data Science Learner Team