Replace PyQt4 wih PyQt5 from "finding missing external packages" script

Issue #263 closed
Former user created an issue

As mentioned, I can not run the following script:

#required packages that are not delivered with the EnMAP-Box
import qgis, PyQt5.QtCore
from osgeo import gdal, ogr, osr
import pip, setuptools
import numpy, scipy, matplotlib
import sklearn

def hasMinimumVersion(version, requiredVersion):
    version = [int(n) for n in version.split('.')]
    requiredVersion = [int(n) for n in requiredVersion.split('.')]

    for n1, n2 in zip(version, requiredVersion):
        if n1 < n2:
            return False
    return True

assert hasMinimumVersion(numpy.version.version, '1.10.0')
assert hasMinimumVersion(sklearn.__version__, '0.19.0')
assert sklearn.__version__ == '0.19.0'
print('All required packages available')

without a replacement of PyQt4 to PyQt5. So, you may consider to update the code in case of any necessity.

Thang

Comments (1)

  1. Log in to comment