hello,
i’m trying to install some packages on a CentOS 7 system using pip3. both pip and pip3 are installed on the system. 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”.
i have also tried python3 -m pip install package
, this gives me the same error.
i have also tried python3 -m pip install package -t {path}
, where {path} is one of the elements in sys.path
, for each element of the path except /usr/local/bin
and the zip file.
printing sys.path
gives me the following :
['/usr/local/bin', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/lib-dynload', '/usr/local/lib64/python3.6/site-packages', '/usr/local/lib/python3.6/site-packages', '/usr/lib64/python3.6/site-packages', '/usr/lib/python3.6/site-packages']
any ideas on how i can resolve this issue ?
failing that, is there a safe way to re-install python 3.6 (and only 3.6) on the system without breaking something else ?