Ansible 1.9.4 has requirement pycrypto>=2.6, but you'll have pycrypto 2.4.1 which is incompatible.

An error occurred:

ansible 1.9.4 has requirement pycrypto>=2.6, but you'll have pycrypto 2.4.1 which is incompatible.

This is easy to do (pit), just go to the official website to download the source package and install it (silent, still too young), you guessed that the result is still not working and continue to report the error, the error is still exactly the same. . . . . . . . . . . . . . .

Use pip list to check that the new version has indeed been updated, but why is it still reporting an error?

Use pip uninstall to uninstall this pycrypto package prompt

Cannot uninstall 'pycrypto'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

As a result, I looked at the pip documentation and found the following paragraph. . . . . . . . . . . .

ip is able to uninstall most installed packages.Known exceptions are: 

  

  - Pure distutils packages installed with ``python setup.py install``, which

    leave behind no metadata to determine what files were installed.

  - Script wrappers installed by ``python setup.py develop``.

Got it, pip cannot uninstall extensions installed using source packages. . . . . . . . . . . .

Find the path where the source package is installed and delete it directly

rm -rf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info   

Checking the version with pip list has been down to 2.4. . . . roar

pip uninstall pycrypto uninstall, reinstall with pip install pycrypto, the default is version 2.6 (python2.7 is currently like this 2018/5/8)

 

This problem is solved:

Summary: pip cannot uninstall extensions installed using source code, it is best to use pip install to install the required extensions! ! ! ! ! ! ! ! ! ! !

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325884135&siteId=291194637