Python easy_install encounters the "ImportError: Entry point ('console _ scripts', 'easy _ install') not found" error.

Source: Internet
Author: User

Python easy_install encounters the "ImportError: Entry point ('console _ scripts', 'easy _ install') not found" error.

Recently, crawlers use the well-known Scrapy. But when installing Scrapy, there are many problems. The first problem is that Scrapy is only compatible with Python and later versions. My machine is still using Python2.6, so the first step is to reinstall Python. The specific installation process will not be described in detail. There are many such tutorials on the Internet, and they are not complicated. Some other packages, such as lxml, need to be used when Scrapy is used. It is usually installed in the original Python version. The lazy way is to copy these packages to the search path of the new Python. For example, the search path for the new Python2.7 is/usr/local/lib/python2.7/site-packages (this is the default path for installing python tools and external packages, easy_install is the default installation path), and the original Python2.6 search path is/usr/local/lib/python2.6/site-packages, copy all files under/usr/local/lib/python2.6/site-packages to/usr/local/lib/python2.7/site-packages.

Another problem occurs when easy_install is installed. Because service_indentity is often used when scrapy is used, install service_indentity with easy_install. the following error occurs:

 

Traceback (most recent call last):  File "/usr/bin/easy_install", line 9, in 
 
      load_entry_point('distribute==0.7.3', 'console_scripts', 'easy_install')()  File "/usr/local/lib/python2.7/site-packages/setuptools-15.0-py2.7.egg/pkg_resources/__init__.py", line 546, in load_entry_point    return get_distribution(dist).load_entry_point(group, name)  File "/usr/local/lib/python2.7/site-packages/setuptools-15.0-py2.7.egg/pkg_resources/__init__.py", line 2665, in load_entry_point    raise ImportError("Entry point %r not found" % ((group, name),))ImportError: Entry point ('console_scripts', 'easy_install') not found
 

 

This is because the upgrade of distribute to version 0.7 is incompatible with the previous easy_install, because distribute is merged with setuptools after version 0.7, the solution is to delete the original easy_install and reinstall distribute.

 

Step 1: Delete easy_install

 

sudo rm -f /usr/bin/easy_install*sudo rm -f /usr/local/bin/easy_install*

 

Part 2: Install distribute

 

curl -O https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.pysudo python distribute_setup.pysudo rm distribute_setup.py

Okay, this problem has been solved!

 

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.