0

I am writing a python application and I have the following dependencies:

Requires-Dist: keyring (==23.9.3) Requires-Dist: keyrings.alt (==4.2.0) Requires-Dist: pandas (==1.3.5) Requires-Dist: pyarrow (==10.0.0) Requires-Dist: requests (==2.28.1) Requires-Dist: requests-toolbelt (==0.10.1) Requires-Dist: toml (==0.10.2)

In the above list, each dependency has its subsequent transitive dependencies. For example "requests" has urllib3 dependency and the version of the same should be above 1.21.1 and below 1.27. - requests [required: ==2.28.1, installed: 2.28.1] - certifi [required: >=2017.4.17, installed: 2022.9.14] - charset-normalizer [required: >=2,<3, installed: 2.0.4] - idna [required: >=2.5,<4, installed: 3.3] - urllib3 [required: >=1.21.1,<1.27, installed: 1.25.8] When my application wheel file is installed (using pip install) is there any way I can make sure that the highest required/supported version of the transitive dependency is also automatically installed?

Currently my application fails to run because the APIs I am using from "requests" is looking for a method from urllib3 version 1.26 or above.

ERROR - __init__() got an unexpected keyword argument 'allowed_methods'

So if there is any way to automatically install the highest required/supported version of the transitive dependencies automatically this problem can be solved. Similar issue can be observed with other transitive dependency versions as well. So request help on this. Thanks in advance.

When my application wheel file is installed (using pip install) is there any way I can make sure that the highest required/supported version of the transitive dependency is also automatically installed?

Currently my application fails to run because the APIs I am using from "requests" is looking for a method from urllib3 version 1.26 or above.

ERROR - __init__() got an unexpected keyword argument 'allowed_methods'

So if there is any way to automatically install the highest required/supported version of the transitive dependencies automatically this problem can be solved. Similar issue can be observed with other transitive dependency versions as well. So request help on this. Thanks in advance.

  • When you install a dependency using pypi, you can use option -U to make sure that you are installing the latest version of the package. However, you can also use Poetry or another dependency manager tool. – GGChe Jan 25 '23 at 10:05

0 Answers0