ImportError: No module named pkg_resources [How to Solve]

This problem is usually caused by PIP execution after upgrading to python2.7. The solution is to re install PIP in the python2.7 environment. The steps are as follows:

System: centos7 (it is recommended to use centos7, 6, if you need to upgrade too many libraries, glibc also needs to upgrade, if you don’t upgrade well, it will be useless)

First type of installation:
yum install gcc python-setuptools python-devel
easy_install pip

If the above does not work, use the following method

1. Install distribute

wget https://pypi.python.org/packages/source/d/distribute/distribute-0.7.3.zip –no-check-certificate
unzip distribute-0.7.3.zip
cd distribute-0.7.3
python setup.py install

2. Install setuptool
https://pypi.python.org/pypi/setuptools Download the latest version
Solve and enter the directory
python setup.py install

3. Install pip
easy_install pip

4. If the installation process of pip report ImportError: No module named extern exception

https://pypi.python.org/pypi/extern Download the latest extern and install it and try again

Similar Posts: