Beispiel #1
0
def raise_numpy_version():
    """
    import numpy
    if numpy.__version__ != get_numpy_version():
    """
    if not numpy_version_ok():
        raise(AssertionError("Inconsistent numpy versions: libValkka compiled with %s / your system is using %s" % \
            (get_numpy_version(), numpy.__version__)))
Beispiel #2
0
def warn_numpy_version():
    """
    import numpy
    if numpy.__version__ != get_numpy_version():
    """
    if not numpy_version_ok():
        print("WARNING : Inconsistent numpy versions: libValkka compiled with %s / your system is using %s" % \
            (get_numpy_version(), numpy.__version__))
Beispiel #3
0
    print("** ATTENTION ** ")
    print(
        "    You are using a different numpy version than was used when libvalkka was compiled"
    )
    print("    Normally this should pose no problem")
    print(
        "    However,if you installed libValkka with apt-get, you'll have a consistent"
    )
    print("    numpy installed in:")
    print("    /usr/lib/python3/dist-packages/")
    print("    you might want to use that version instead")
    print(
        "    You can use the make_venv.bash script for creating a virtual environment"
    )

if not core.numpy_version_ok():
    print()
    print("** WARNING ** ")
    print("    INCOMPATIBLE NUMPY VERSIONS DETECTED")
    print("    YOU SHOULD INSTALL A COMPATIBLE VERSION OF NUMPY")
    print("    OR SUFFER THE CONSEQUENCES (SEGFAULTS)")

print()

print("Loading OpenCV")
import cv2

print("OpenCV loaded ok")
print("   Version      ", cv2.__version__)
print("   Loaded from  ", cv2.__file__)
print()