-1

hey i have 2 versions of python on my computer(2.7 and 3.5), im trying to use pip3, but it shows me this error message

Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==18.1' distribution was not found and is required by the application

I know pip3 should work with python3 but here it shows in the error python2.7 so that's probably the error but how do i fix that to point my python 3.5.2.

thank you very much!

Jens
  • 67,715
  • 15
  • 98
  • 113

1 Answers1

0

Give these a go

python3 -m pip install -U --force-reinstall pip
python -m pip install -U --force-reinstall pip
Steve Kline
  • 805
  • 4
  • 11