Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I am using pip on EC2 now, the python version is 2.7. 'sudo pip' suddenly doesn't work anymore.

[ec2-user@ip-172-31-17-194 ~]$ sudo pip install validate_email

Traceback (most recent call last):

  File "/usr/bin/pip", line 5, in <module>

    from pkg_resources import load_entry_point

  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 3138, in <module>


  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 3124, in _call_aside

    f(*args, **kwargs)

  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 3151, in _initialize_master_working_set

    working_set = WorkingSet._build_master()

  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 663, in _build_master

    return cls._build_from_requirements(__requires__)

  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 676, in _build_from_requirements

    dists = ws.resolve(reqs, Environment())

  File "/usr/local/lib/python2.7/site-packages/pkg_resources/", line 849, in resolve

    raise DistributionNotFound(req, requirers)

pkg_resources.DistributionNotFound: The 'pip==6.1.1' distribution was not found and is required by the application

[ec2-user@ip-172-31-17-194 ~]$ which pip


1 Answer

0 votes
by (44.4k points)

First, try this:

easy_install --upgrade pip

If it shows an error, then do this before that

easy_install -U setuptools

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
+4 votes
5 answers
0 votes
1 answer

Browse Categories