0 votes
1 view
in AWS by (19.2k points)

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

[[email protected] ~]$ 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/__init__.py", line 3138, in <module>

    @_call_aside

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

    f(*args, **kwargs)

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

    working_set = WorkingSet._build_master()

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

    return cls._build_from_requirements(__requires__)

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

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

  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", 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

[[email protected] ~]$ which pip

/usr/local/bin/pip

1 Answer

0 votes
by (44.6k points)

First, try this:

easy_install --upgrade pip

If it shows an error, then do this before that

easy_install -U setuptools

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...