Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I force pip to install a package even with a version conflict?

Tags:

python

pip

During an installation, pip is throwing an error due to version conflicts

ERROR: Could not find a version that satisfies the requirement XXX==1.2.1

This is due to a package made by the company for witch I work ( not open source work ).
The reason for witch it is blocking is because it is locked in python version 3.6 and I am attempting to use python 3.9

Is it possible or not to ask pip to force install a package even though it was not built / tested for this specific version of python ?

To be clear, I am fully aware that this is normally not a good idea. I however have little alternatives as the team that manages that specific package no longer exists. It is a dependency we are attempting to remove but until we can, we need to use it

Can I ask pip to use the latest version of the package even though it may break ? I'll add that there are no other package conflicts, just this one with python version so I should - in theory - be the only issue

like image 721
Matthieu Raynaud de Fitte Avatar asked Oct 18 '25 13:10

Matthieu Raynaud de Fitte


1 Answers

I haven't tried it myself yet, but according to the documentation, pip install has the following argument that may help to bypass it:

--ignore-requires-python
Ignore the Requires-Python information.

https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-ignore-requires-python

like image 175
Meny Issakov Avatar answered Oct 20 '25 02:10

Meny Issakov