When using Python easy_install, the prompt Entry point ('console _ Scripts', 'Easy _ install') not found is displayed.

Source: Internet
Author: User

When easy_install is used on some Linux machines to install MySQLdb, the web. py makes several RESTful APIs and several webpages. To interact with MySQL, you need to use the Python library MySQLdb. When you use the "sudo easy_install MySQL-python" command to install MySQLdb, the system prompts"
Please install a more recent version first, using 'easy _ install-U distribute '. ", I will execute the" sudo easy_install-U distribute "command to upgrade distribute. Unexpectedly, easy_install is not available after the upgrade. The following error occurs:

The code is as follows: Copy code
Jay @ jay-linux :~ $ Sudo easy_install MySQL-python
Traceback (most recent call last ):
File "/usr/local/bin/easy_install", line 9, in <module>
Load_entry_point ('stristriket', 'console _ Scripts', 'Easy _ install ')()
File "/usr/local/lib/python2.7/dist-packages/setuptools-1.4.1-py2.7.egg/pkg_resources.py", line 357, in load_entry_point
Return get_distribution (dist). load_entry_point (group, name)
File "/usr/local/lib/python2.7/dist-packages/setuptools-1.4.1-py2.7.egg/pkg_resources.py", line 2393, in load_entry_point
Raise ImportError ("Entry point % r not found" % (group, name ),))
ImportError: Entry point ('console _ Scripts', 'Easy _ install') not found



The version after distribute is upgraded to version 0.7 is incompatible with easy_install, because distribute is merged with setuptools after Version 0.7, find a useful solution on the Internet (applicable to CentOS, Ubuntu, and Mac), as follows:

1. Delete executable files related to the easy_install command

Check your/usr/bin and/usr/local/bin for easy_install installations and remove any old script:

The code is as follows: Copy code
Jay @ jay-linux :~ $ Sudo rm/usr/bin/easy_install *
Jay @ jay-linux :~ $ Sudo rm/usr/local/bin/easy_install *



2. Download and install distribute

Download and run distribute:

The code is as follows: Copy code
Jay @ jay-linux :~ $ Curl-O http://python-distribute.org/distribute_setup.py
Jay @ jay-linux :~ $ Sudo python distribute_setup.py
Jay @ jay-linux :~ $ Sudo rm distribute_setup.py



If the above distribute_setup.py cannot be downloaded successfully, then you can directly download The distribute source package: https://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
Refer to the installation process of this document, https://pypi.python.org/pypi/distribute/0.6.49

3. Execute easy_install again and fix it.

Try again, and enjoy. E. g .:

The code is as follows: Copy code
Jay @ jay-linux :~ $ Sudo easy_install pip
Jay @ jay-linux :~ $ Sudo easy_install MySQL-python
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.