0

i'm trying to install some packages on a CentOS 7 system where both pip and pip3 are installed. pip3 won't install the packages because for some reason it doesn't seem to recognise that its version of python is correct.

an example (edited for clarity) :

    $ python3 --version
    Python 3.6.8
    
    $ pip3 --version
    pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
    
    $ pip3 -v install package
    Collecting package
      1 location(s) to search for versions of package:
      * https://pypi.python.org/simple/package/
      Getting page https://pypi.python.org/simple/package/
      Looking up "https://pypi.python.org/simple/package/" in the cache
      Returning cached "301 Moved Permanently" response (ignoring date and etag information)
      Looking up "https://pypi.org/simple/package/" in the cache
      Current age based on date: 429
      Freshness lifetime from max-age: 600
      Freshness lifetime from request max-age: 600
      The response is "fresh", returning cached response
      600 > 429
      Analyzing links from page https://pypi.org/simple/package/
        Skipping link https://files.pythonhosted.org/packages/{very-long-path-here} (from https://pypi.org/simple/package/) (requires-python:>=3.5); it is not compatible with this Python
  ...

so even though pip3 recognises that it's from python 3.6, it won't install packages requiring python 3.5 or greater, saying "it is not compatible withi this Python".

any ideas on how i can resolve this issue ?

david furst
  • 329
  • 4
  • 17
  • use `python3 -m pip install ` – sahasrara62 Oct 25 '22 at 16:33
  • https://stackoverflow.com/a/70300436/12890258 it may help you – codingPhobia Oct 25 '22 at 17:05
  • @sahasrara62 many thanks to both of you for your help. i tried this approach both without -t and with -t for each element in the python path one at a time, but still got the same result each time. is it possible to find out how pip decides what version it is? – david furst Oct 26 '22 at 07:33

0 Answers0