it helps some times Steps: convert your ranges into a more strict notation to eliminate ',18.104.22.168' and '1.0,2.3.4' (we need exact lower bounds for the last step) convert your strings into actual Version objects for ease of comparisons (you could also do some conversion to numeral tuples but they break on versions containing non-numeric characters)
from packaging.version import Version
from functools import cmp_to_key
from collections import defaultdict
def adj_lengths(s, c=3):
"""Add missing .0 to a version up to a predefined count '.'-count.
Example: '9.0.2' with c == 3 -> '22.214.171.124'"""
cnt = s.count(".")
s = s + ".0"*(c-cnt)
"""Make versions more precise by replacing implicit range starts.
Uses adj_lengths to add missing .0 to equalize version lengths.
Handles splitting multiple given ranges as well.
Example: '[,1.3.11),[,1.7.0), [,1.8.0)'
-> (['0.0.0.0', '126.96.36.199'],['0.0.0.0', '188.8.131.52'], ['0.0.0.0', '184.108.40.206'])"""
s = s.replace("[,",f"[0,")
s1 = [ adj_lengths(b) for b in (t.strip("[()] ") for t in s.split(","))]
yield from [ s1[i:i+2] for i in range(0,len(s1),2)]
"""Transform text-list into Version-tuple."""
return ( Version(l), Version(l) )
vers = ["[,220.127.116.11)",
# preprocessing to make them nicer
vers2 = 
for tmp in (split_mult(a) for a in vers) :
vers2.extend( (make_version(k) for k in tmp) )
# bring into order
# use the lower bound as key - append alle upper bounds to a defaultdict(list)
d = defaultdict(list)
for fr,to in vers2:
# simplify lower bound:[list of upper bounds] to (lower bound, max(upper bound list values))
vers3 = [ (k,max(v)) for k,v in d.items()]
# eliminate range that lie inside the 1st elements range
for item in vers3[1:][:]:
if item >= vers3 and item <= vers3:
Does that help See here for a list of download URLs for the latest available build of previous releases: Can I install an older version of Worklight studio? If you are an IBM customer or business partner, you should contact IBM to get a specific build of a version that you may require.
Why is Angular version 4 compatible with version 2 if they use semantic versioning?
will be helpful for those in need I had the same problem while trying to initiate h2o inside a virtual environment using jupyter notebook. As it has been said on the previous thread OSError: Version mismatch while installing h2o? you probably have to kill the h2o cluster. In my case it worked with: