GithubHelp home page GithubHelp logo

hsnr-gamera / gamera-4 Goto Github PK

View Code? Open in Web Editor NEW
9.0 7.0 8.0 14.74 MB

Gamera 4 for Python 3

License: GNU General Public License v2.0

CMake 0.01% Python 17.28% C 16.77% Shell 0.01% C++ 65.74% Objective-C 0.20%

gamera-4's Introduction

Gamera 4 (for Python 3)

Gamera is a framework for building document analysis applications.
It is not a packaged document recognition system, but a toolkit for building document image recognition systems.

For more information about Gamera, visit the Gamera website at:

http://gamera.informatik.hsnr.de/

Installation and Usage

See the INSTALL file for installation instructions, or online under

http://gamera.informatik.hsnr.de/docs/gamera-docs/install.html

The complete Gamera documentation is available online at:

http://gamera.informatik.hsnr.de/docs/gamera-docs/

Authors and License

(c)2001-2003 Michael Droettboom, Karl Mac Millan, Ichiro Fujinaga
(c)2004-2007 Michael Droettboom
(c)2008-2019 Michael Droettboom and Christoph Dalitz

See the file ACKNOWLEDGEMENTS for additional contributors.

This software is distributed under the GNU General Public License version 2, or (at your option) any later version. See the file LICENSE for more information.

As the GNU GPL is only applicable to software, the accompanying documentation is distributed under the terms of the Creative Commons Attribution-Share Alike license. See the bottom of the file doc/src/index.txt for details.

gamera-4's People

Contributors

cdalitz avatar cyperghost avatar friedrichfroebel avatar fujinaga avatar jannschu avatar jedah007 avatar jwilk avatar mdboom avatar rmast avatar vincsdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gamera-4's Issues

image.to_grey16() outputs fully black images


name: ๐ŸžBug
about: Conversion .to_grey16() method
title: '.to_grey16() outputs fully black images'

Current Behavior:

I am using Gamera4 to convert RGB images to Greyscale16 format. I have tried more than 10 datasets and all output fully black images using the .to_grey16() method in the image conversions. The same thing happens with Gamera3. I am wondering where this problem is coming from and if this has ever happened previously.

Expected Behavior:

The method is supposed to return a black and white image in a greyscale16 format but it is not.

Steps To Reproduce:

In a python3.7 environment:

from gamera.core import *

def test(image):
    img = load_image(image)
    img2 = img.to_grey16()
    img2.save_PNG("out.png")

if __name__ == "__main__":
    image = "TODO: EDIT THE INPUT_PATH"
    init_gamera()
    test(image)

You can try testing the script using the following input RGB image.
ConvertRGBImageToGrayscaleImageExample_01

Environment:

  • M1 Mac python 3.7
  • Debian Linux 5.10.104 python3.7

Python 3.11 compatibility

I just started evaluating whether gamera-4 already works with the latest release candidate of Python 3.11. Doing so, I performed some initial clean-up of build warnings as well to reduce the build noise, as I still did not manage to get a successful package. My changes are currently available at https://github.com/FriedrichFroebel/gamera-4.

What I did so far:

  • Py_TYPE had to be changed to Py_SET_TYPE.
  • The VIGRA build warnings have been fixed by using the upstream replacements of the offending sections.
  • Some eodev warnings concerning wrongly indented code have been fixed.

What I might fix in the near future to further reduce the build noise:

  • The buffer API changes for Python.
  • The call API changes for Python.

While Python 3.8 to Python 3.10 still work with these changes, I am facing failing tests on Python 3.11:

============================= test session starts ==============================
platform linux -- Python 3.11.0rc2, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/runner/work/gamera-4/gamera-4
collected 285 items / 16 errors

==================================== ERRORS ====================================
__________________ ERROR collecting tests/test_classifier.py ___________________
tests/test_classifier.py:1: in <module>
    from gamera import knn, classify, gamera_xml
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/knn.py:23: in <module>
    from gamera import core, util, config, classify
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
_____________________ ERROR collecting tests/test_color.py _____________________
tests/test_color.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
___________________ ERROR collecting tests/test_features.py ____________________
tests/test_features.py:1: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
__________________ ERROR collecting tests/test_floatpoint.py ___________________
tests/test_floatpoint.py:3: in <module>
    from gamera.gameracore import FloatPoint as FP
E   SystemError: initialization of gameracore raised unreported exception
________________ ERROR collecting tests/test_graph_colorize.py _________________
tests/test_graph_colorize.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
_____________________ ERROR collecting tests/test_image.py _____________________
tests/test_image.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
__________________ ERROR collecting tests/test_image_info.py ___________________
tests/test_image_info.py:1: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
__________________ ERROR collecting tests/test_load_image.py ___________________
tests/test_load_image.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
_____________________ ERROR collecting tests/test_mlcc.py ______________________
tests/test_mlcc.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
__________________ ERROR collecting tests/test_nested_list.py __________________
tests/test_nested_list.py:1: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
____________________ ERROR collecting tests/test_plugins.py ____________________
tests/test_plugins.py:1: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
_____________________ ERROR collecting tests/test_rect.py ______________________
tests/test_rect.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
______________________ ERROR collecting tests/test_rle.py ______________________
tests/test_rle.py:1: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
__________________ ERROR collecting tests/test_save_image.py ___________________
tests/test_save_image.py:1: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
____________________ ERROR collecting tests/test_voronoi.py ____________________
tests/test_voronoi.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
______________________ ERROR collecting tests/test_xml.py ______________________
tests/test_xml.py:3: in <module>
    from gamera.core import *
/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/gamera-4.0.0-py3.11-linux-x86_64.egg/gamera/core.py:51: in <module>
    from gamera.gameracore import UNCLASSIFIED, AUTOMATIC, HEURISTIC, MANUAL
E   SystemError: initialization of gameracore raised unreported exception
=========================== short test summary info ============================
ERROR tests/test_classifier.py - SystemError: initialization of gameracore ra...
ERROR tests/test_color.py - SystemError: initialization of gameracore raised ...
ERROR tests/test_features.py - SystemError: initialization of gameracore rais...
ERROR tests/test_floatpoint.py - SystemError: initialization of gameracore ra...
ERROR tests/test_graph_colorize.py - SystemError: initialization of gameracor...
ERROR tests/test_image.py - SystemError: initialization of gameracore raised ...
ERROR tests/test_image_info.py - SystemError: initialization of gameracore ra...
ERROR tests/test_load_image.py - SystemError: initialization of gameracore ra...
ERROR tests/test_mlcc.py - SystemError: initialization of gameracore raised u...
ERROR tests/test_nested_list.py - SystemError: initialization of gameracore r...
ERROR tests/test_plugins.py - SystemError: initialization of gameracore raise...
ERROR tests/test_rect.py - SystemError: initialization of gameracore raised u...
ERROR tests/test_rle.py - SystemError: initialization of gameracore raised un...
ERROR tests/test_save_image.py - SystemError: initialization of gameracore ra...
ERROR tests/test_voronoi.py - SystemError: initialization of gameracore raise...
ERROR tests/test_xml.py - SystemError: initialization of gameracore raised un...
!!!!!!!!!!!!!!!!!!! Interrupted: 16 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 16 errors in 0.97s ==============================

I am not sure what the actual issue is here, as the message is not really helpful. Only test_graph.py and test_kdtree.py are not affected here. The build seems to work correctly (at least there are no errors any more, just warnings). Does anyone have an idea about this and how it could be fixed?

Tests break with pytest 7.2.0

CI builds started breaking today due to pytest 7.2.0 removing the py.test import support. At the time of writing this, the changelog on the website does not yet include this new release, but GitHub already provides the corresponding data. The offending change is pytest-dev/pytest#10396.

Errors appear like this:

______________________ ERROR collecting tests/test_xml.py ______________________
ImportError while importing test module '/home/runner/work/gamera-4/gamera-4/tests/test_xml.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_xml.py:1: in <module>
    import py.test
E   ModuleNotFoundError: No module named 'py.test'; 'py' is not a package

The solution is to simply replace the imports and usages of py.test with pytest. I will open a corresponding PR when I find some more time in the next days.

๐Ÿž cknn.group_and_update_list_automatic Assertion error when used for NonInteractive classifier

name: ๐Ÿž cknn.group_and_update_list_automatic used for NonInteractive Classifier AssertionError Bug

title: ' cknn.group_and_update_list_automatic method raises Assertion Error'

Current Behavior:

I am using Gamera4 to classify 2 xml inputs using the NonInteractive classifier. When the code runs cknn.group_and_update_list_automatic there is an assertion error looking like this:

File "/usr/local/lib/python3.7/dist-packages/gamera/classify.py", line 159, in group_and_update_list_automatic
    added, removed = self.group_list_automatic(glyphs, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/gamera/classify.py", line 145, in group_list_automatic
    G = self._pregroup(glyphs, grouping_function)
  File "/usr/local/lib/python3.7/dist-packages/gamera/classify.py", line 171, in _pregroup
    assert G.has_node(glyph)
AssertionError

My guess is that the error is coming from how glyphs are added as nodes of a graph because the same code is run in python2 and Gamera3 but fails in python3 and Gamera4.

Expected Behavior:

The assert G.has_node(glyph) snippet must return True.

Steps To Reproduce:

In a python3.7 environment:

  1. Add a tester.py file with the following code to {YOUR_WORKING_DIRECTORY} (make sure you have the dependencies in the import statements installed) and replace {YOUR_WORKING_DIRECTORY} with the path of your working directory inside the python code.
import os
from shutil import copyfile
import gamera.core
import gamera.gamera_xml
import gamera.classify
import gamera.knn
from gamera.gamera_xml import glyphs_from_xml
import tempfile
import shutil

tempdir="{YOUR_WORKING_DIRECTORY}/tmp"
classifier_path = "{YOUR_WORKING_DIRECTORY}/Interactive Classifier - GameraXML - Training Data Jan 19 (1).xml"
tempPath = os.path.join(tempdir, classifier_path + '.xml')
copyfile(classifier_path, tempPath)

cknn = gamera.knn.kNNNonInteractive(tempPath)

print(("cknn variable created from the knn.kNNNonInteractive is: {0} and has type: {1}").format(cknn, type(cknn)))

func = gamera.classify.BoundingBoxGroupingFunction(4)

print(("func coming from classify.BoundingBoxGroupingFunction with input 4 is: {0} and has type: {1}").format(func, type(func)))

print(("func has attributes theshold: {0} and function: {1}").format(func._threshold, func._function))

ccs = glyphs_from_xml('{YOUR_WORKING_DIRECTORY}/CC Analysis - GameraXML - Connected Components.xml')

print(("ccs created from the \" glyphs from xml method \" is: {0} and has type: {1}").format(ccs, type(ccs)))

cs_image = cknn.group_and_update_list_automatic(ccs,
                                        grouping_function=func,
                                        max_parts_per_group=4,
                                        max_graph_size=16)

# Generate the Gamera features
cknn.generate_features_on_glyphs(cs_image)
# Write the glyphs to GameraXML
output_xml = gamera.gamera_xml.WriteXMLFile(glyphs=cs_image,
                                    with_features=True)

output_xml.write_filename("{YOUR_WORKING_DIRECTORY}/output.xml")
  1. Add a directory called tmp to {YOUR_WORKING_DIRECTORY}
  2. Unzip the following files and add them to {YOUR_WORKING_DIRECTORY}:
    Archive 2.zip
  3. Run the script.

Environment:

M1 Mac python 3.7
Debian Linux 5.10.104 python3.7
Windows with Intel chip python 3.7

A typo

Extra comma:
File "setup.py", line 210
**gamera_setup.extras,
SyntaxError: invalid syntax

Harmonization of license statements

The code currently has different license statements, which should be unified to make everything more clear:

  • General GPL with reference to LICENSE file:
    This software is distributed under the GNU General Public License.
  • The GPL-2.0 license file itself at https://github.com/hsnr-gamera/gamera-4/blob/master/LICENSE
  • The GPL-2.0-only statement in
    license='GNU GENERAL PUBLIC LICENSE Version 2',
  • The GPL-2.0-only trove classifier in
    'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
  • The GPL-2.0-or-later header in most of the source files:

    gamera-4/setup.py

    Lines 7 to 10 in 8bbda5d

    # This program is free software; you can redistribute it and/or
    # modify it under the terms of the GNU General Public License
    # as published by the Free Software Foundation; either version 2
    # of the License, or (at your option) any later version.

The above does not include license statements for the third-party modules, which might have different licenses and sometimes even strange copyright statements which do not appear to really match the actual general license (example: src/eodev provides a mix of different LGPL versions, while the actual license for the eodev module is considered LGPL-2.1-only).

test_rle.py::test_rle1 Fatal Python error: Segmentation fault

Hello,

When running the test suite, I get:

test_rle.py::test_rle1 Fatal Python error: Segmentation fault

Current thread 0x00007ffff7831340 (most recent call first):
  File "/gnu/store/5svj6vddh96rn46wgfx196vhwrh1wm1m-python-gamera-4.0.0/lib/python3.9/site-packages/gamera/plugins/gui_support.py", line 98 in __call__
  File "/tmp/guix-build-python-gamera-4.0.0.drv-0/gamera-4.0.0/tests/test_rle.py", line 25 in test_rle1
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/python.py", line 183 in pytest_pyfunc_call
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/python.py", line 1641 in runtest
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 162 in pytest_runtest_call
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 255 in <lambda>
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 311 in from_call
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 254 in call_runtest_hook
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 215 in call_and_report
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 126 in runtestprotocol
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 109 in pytest_runtest_protocol
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 348 in pytest_runtestloop
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 323 in _main
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 269 in wrap_session
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/config/__init__.py", line 162 in main
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/config/__init__.py", line 185 in console_main
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/bin/.pytest-real", line 33 in <module>
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "pytest" arguments: ("-vv" "--ignore" "test_plugins.py") exit-status: #f term-signal: 11 stop-signal: #f> 
phase `check' failed after 3.5 seconds
command "pytest" "-vv" "--ignore" "test_plugins.py" failed with signal 11

This seems to occur on every run.

Any ideas what could be causing it?

The direct input versions are: dependencies: [email protected] [email protected] [email protected] [email protected]

Deprecation warnings for VIGRA

Building the package on Ubuntu 20.04 with GCC 9.30 reports some warnings for the included vigra library like the following ones:

In file included from include/vigra/colorconversions.hxx:45,
                 from include/pixel.hpp:47,
                 from include/gamera.hpp:53,
                 from include/gameramodule.hpp:25,
                 from src/gameracore/gameramodule.cpp:23:
include/vigra/functortraits.hxx:166:31: warning: โ€˜template<class _Operation> class std::binder1stโ€™ is deprecated [-Wdeprecated-declarations]
  166 | VIGRA_DEFINE_STL_FUNCTOR(std::binder1st, VigraTrueType, VigraFalseType)
      |                               ^~~~~~~~~
include/vigra/functortraits.hxx:131:21: note: in definition of macro โ€˜VIGRA_DEFINE_STL_FUNCTORโ€™
  131 | class FunctorTraits<name<T> > \
      |                     ^~~~
In file included from /usr/include/c++/9/bits/stl_function.h:1392,
                 from /usr/include/c++/9/string:48,
                 from /usr/include/c++/9/stdexcept:39,
                 from include/vigra/config.hxx:42,
                 from include/vigra/rgbvalue.hxx:44,
                 from include/pixel.hpp:46,
                 from include/gamera.hpp:53,
                 from include/gameramodule.hpp:25,
                 from src/gameracore/gameramodule.cpp:23:
/usr/include/c++/9/backward/binders.h:108:11: note: declared here
  108 |     class binder1st
      |           ^~~~~~~~~
In file included from include/vigra/colorconversions.hxx:45,
                 from include/pixel.hpp:47,
                 from include/gamera.hpp:53,
                 from include/gameramodule.hpp:25,
                 from src/gameracore/gameramodule.cpp:23:
include/vigra/functortraits.hxx:167:31: warning: โ€˜template<class _Operation> class std::binder2ndโ€™ is deprecated [-Wdeprecated-declarations]
  167 | VIGRA_DEFINE_STL_FUNCTOR(std::binder2nd, VigraTrueType, VigraFalseType)
      |                               ^~~~~~~~~
include/vigra/functortraits.hxx:131:21: note: in definition of macro โ€˜VIGRA_DEFINE_STL_FUNCTORโ€™
  131 | class FunctorTraits<name<T> > \
      |                     ^~~~
In file included from /usr/include/c++/9/bits/stl_function.h:1392,
                 from /usr/include/c++/9/string:48,
                 from /usr/include/c++/9/stdexcept:39,
                 from include/vigra/config.hxx:42,
                 from include/vigra/rgbvalue.hxx:44,
                 from include/pixel.hpp:46,
                 from include/gamera.hpp:53,
                 from include/gameramodule.hpp:25,
                 from src/gameracore/gameramodule.cpp:23:
/usr/include/c++/9/backward/binders.h:143:11: note: declared here
  143 |     class binder2nd
      |           ^~~~~~~~~

If I understand correctly, this should be fixed in the upstream version of vigra: ukoethe/vigra#500.

According to https://github.com/hsnr-gamera/gamera-4/blob/master/include/vigra/README gamera-4 bundles a copy of vigra. We might want to update the whole copy as well or use a submodule-based approach if possible.

knnmodule.hpp: Type Error raised when id is a string

I'm unsure if this is an issue and would like to get clarifications.
We are using gamera-4 to classify 2 xml inputs using the Interactive Classifier. This error was raised when classify_with_images was called. In knncoremodule.cpp the function knn_classify_with_images is calling image_get_id_name where it throws the error "knn: could not get string from id_name tuple." on line 90. More specifically, this one:

Py_ssize_t lenTmp = 0;
  if(PyBytes_AsStringAndSize(id, id_name, &lenTmp) < 0){
	  PyErr_SetString(PyExc_TypeError, "knn: could not get string from id_name tuple.");
	  return -1;
  }

Further investigation suggested that the error is being thrown when id (which is the class_name as I understand) is not of type bytes and we worked around this error by converting it from PyUnicode to a PyBytes object.
My main question is was id intended to be a PyBytes object? I looked through core.py and under classify_manual and classify_automatic (line 341 and 367), id_name was checked to see whether it is a string or unicode object with the util function (line 359).
If i misunderstood the how this works I would really appreciate it if you can correct me. Thank you very much!

Uses deprecated PyObject_CheckReadBuffer and PyObject_AsReadBuffer

When building the package on Python 3.8, some deprecation warnings are raised due to using the old buffer protocol (https://docs.python.org/3/c-api/objbuffer.html).

As already mentioned in the TODO file, these should be replaced to guarantee compatibility to future Python versions, although the corresponding methods are still part of the current development version according to https://github.com/python/cpython/blob/main/Include/abstract.h.

Unable to open an image

I've tried to start my work from the scratch and got
`

image0 = load_image(r"/home/vmbuster/Gamera/source_image.tiff")
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/dist-packages/gamera/core.py", line 119, in load_image
raise IOError("'%s' could not be loaded." % filename)
OSError: '/home/vmbuster/Gamera/source_image.tiff' could not be loaded.
`
The image in question has been included in my other issue report.

Re-enable CI

CI seems to be inactive at the moment. Some stuff has been changed for Travis lately, so it might be a good idea to migrate to GitHub Actions.

I gave it a quick shot today, but ran into some issues which appeared to be related to the GUI. What I have tried:

  • Build wxPython from source to build Gamera with GUI support. This resulted in wxPython compilation taking a long time, which I aborted after taking 30 minutes. Building wxPython from source seems to be the only reasonable way to get GUI support working with the ubuntu-latest image (Ubuntu 20.04) and different Python versions (actions/setup-python@v2).
  • Build Gamera without GUI support, id est using the --nowx option. When running pytest, there has been a segmentation fault which appeared to be related to importing the gui.py module.

Trouble installing gamera 4.1.0

I am following the installation steps given in the website . I have downloaded gamera 4.1.0.
I have install virtual environment and wxPython .
But when i try to install it , the following problem is coming .

(base) vkhiangte@Vanlalhmangaihas-iMac gameratool % source /Users/vkhiangte/Documents/gameratool/bin/activate
(gameratool) (base) vkhiangte@Vanlalhmangaihas-iMac gameratool % cd /Users/vkhiangte/Documents/gameratool/gamera-4.1.0 
(gameratool) (base) vkhiangte@Vanlalhmangaihas-iMac gamera-4.1.0 % pip3 install .
Processing /Users/vkhiangte/Documents/gameratool/gamera-4.1.0
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  ร— python setup.py egg_info did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [42 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/setup.py", line 50, in <module>
          plugin_extensions = gamera_setup.generate_plugins(plugins, "gamera.plugins")
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/gamera/gamera_setup.py", line 104, in generate_plugins
          extension = generate.generate_plugin(
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/gamera/generate.py", line 328, in generate_plugin
          plugin_module = __import__(module_name)
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/gamera/generate.py", line 79, in magic_import
          return std_import(name, globals_, locals_, fromlist, level)
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/gamera/plugins/png_support.py", line 78, in <module>
          class PngSupportModule(PluginModule):
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/gamera/plugins/png_support.py", line 96, in PngSupportModule
          cpp_sources = [os.path.join(internal_png_dir, x) for x in
        File "/Users/vkhiangte/Documents/gameratool/gamera-4.1.0/gamera/plugins/png_support.py", line 96, in <listcomp>
          cpp_sources = [os.path.join(internal_png_dir, x) for x in
      NameError: name 'internal_png_dir' is not defined
      
      Gamera version: 4.1.0
      skipping wrapper generation for corelation plugin (output up-to-date)
      skipping wrapper generation for structural plugin (output up-to-date)
      skipping wrapper generation for arithmetic plugin (output up-to-date)
      skipping wrapper generation for transformation plugin (output up-to-date)
      skipping wrapper generation for color plugin (output up-to-date)
      skipping wrapper generation for convolution plugin (output up-to-date)
      skipping wrapper generation for gui_support plugin (output up-to-date)
      skipping wrapper generation for logical plugin (output up-to-date)
      skipping wrapper generation for fourier_features plugin (output up-to-date)
      skipping wrapper generation for pagesegmentation plugin (output up-to-date)
      skipping wrapper generation for features plugin (output up-to-date)
      skipping wrapper generation for misc_free_functions plugin (output up-to-date)
      skipping wrapper generation for binarization plugin (output up-to-date)
      skipping wrapper generation for image_conversion plugin (output up-to-date)
      skipping wrapper generation for threshold plugin (output up-to-date)
      skipping wrapper generation for deformation plugin (output up-to-date)
      skipping wrapper generation for morphology plugin (output up-to-date)
      skipping wrapper generation for tiff_support plugin (output up-to-date)
      skipping wrapper generation for geometry plugin (output up-to-date)
      skipping wrapper generation for listutilities plugin (output up-to-date)
      skipping wrapper generation for image_utilities plugin (output up-to-date)
      skipping wrapper generation for misc_filters plugin (output up-to-date)
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

ร— Encountered error while generating package metadata.
โ•ฐโ”€> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Thanks in advance

Build problem

I just compiled the source on Debian buster and get

  File "/usr/local/lib/python3.7/dist-packages/gamera/gui/classifier_display.py", line 922, in _OnOpenAll
    """)
  File "/usr/local/lib/python3.7/dist-packages/gamera/args.py", line 44, in show
    raise Exception("No GUI environment available.  Cannot display dialog.")
Exception: No GUI environment available.  Cannot display dialog.
``
Any suggestion?

Best regards

Janusz

Publish on PyPI?

I would like to see gamera to be available on PyPI (which is why I just submitted PR #64 to at least complete the basic information). This should improve the installation experience for packages which depend on gamera and which have to rely on GitHub-based installations at the moment.

Unfortunately, this is currently blocked by an existing package under the same name by an (unknown?) user Glass.Cube, which only provides a Windows binary for Python 2.7 and gamera version 3.3.3, uploaded in 2012. To take over the package, it seems like https://peps.python.org/pep-0541/#how-to-request-a-name-transfer applies (the URL points to the general gamera webpage at HSNR and there is no public contact address as far as I am aware).

Is there any interest on your side to tackle this? Alternatively, if it is okay for you, I would try to work on this myself.

Deprecation of distutils

When building the package with some recent Python version (3.10.5 in my case), there are warnings about distutils being used, but deprecated:

$ python setup.py --nowx build
/home/runner/work/didjvu/didjvu/deps/gamera-4-4.0.0/setup.py:27: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.ccompiler import CCompiler
Gamera version: 4.0.0
Compiling genetic algorithms with parallelization (OpenMP)
generating wrappers for string_io plugin
[...]

Description set to build hint?

When looking at the build/install log, I observed the following warning:

/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/lib/python3.11/site-packages/setuptools/dist.py:160: UserWarning: newlines not allowed and will break in the future
  warnings.warn("newlines not allowed and will break in the future")

Skimming through the code, it seems like this is caused by the following lines, which define the description field value for the package:

gamera-4/setup.py

Lines 231 to 243 in f374434

if not no_wx:
import wx
wx_version_info = wx.__version__.split(".")
wxversion = "%s.%s" % (wx_version_info[0], wx_version_info[1])
description = ("This is the Gamera installer.\n" +
"\tPlease ensure that Python " + pythonversion +
" and wxPython " + wxversion + "\n" +
"\tare installed before proceeding.")
else:
description = ("This is the Gamera installer.\n" +
"\tPlease ensure that Python " + pythonversion +
"\tare installed before proceeding.")

Is it correct that the package describes itself with some information regarding the build/installation requirements, instead of its actual purpose?

to_pil/from_pil not reliable

Conversion back and forth between PIL and Gamera-4 is more buggy than it was with hsnr-gamera for python 2.7.

Try this with Python 2 and Python 3:

from gamera.plugins.pil_io import from_pil as _from_pil
from gamera.core import Image
from PIL import Image as im
image = im.open('ycbcr-jpeg.tiff')
ycbcr = image.convert('RGB')
ycbcr.show()
gamera_image = _from_pil(ycbcr)
pil_image = gamera_image.to_pil()
pil_image.show()
python2 -m pip list
Package    Version
---------- -------
gamera     3.4.2
Pillow     6.2.1
python3 -m pip list
Package                                Version
-------------------------------------- --------------------
gamera                                 4.0rc0
Pillow                                 7.0.0

ycbcr-jpeg.zip

You'll see the picture is ok with python 2, but becomes a green mess with python 3.

problem when import gamera

Hi,

Iโ€™m working on a project and I would like to test your software which seems wonderful.

I posted โ€œIssuesโ€ which are not really issues but simply missing libraries and things like that, so that other people that encounter the same problems can find out quickly how to get what they need.

I followed the instructions from the following page: https://gamera.informatik.hsnr.de/docs/gamera-docs/install.html

$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"

I Installed all the required libraries and launched โ€œpython3 setup.py buildโ€ and it compiles.

But after that, when I simply try to import gamera I get:

$ python3
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import gamera
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'gamera'

and when I run hello_world.py from the examples folder I get:

$ python3 hello_world.py
Traceback (most recent call last):
File "hello_world.py", line 3, in
from gamera.core import *
ModuleNotFoundError: No module named 'gamera'

I tried on a CentOs, Ubuntu and a Windows 10 machine and get the same message.

Sorry if it is something obvious but I don't know what to do to get it work. I'm certainly doing something wrong but I don't know what. Could you help me with that please?

Import error with libpng

Hi,

$ python3 setup.py build
Gamera version: 4.0.pre
Compiling genetic algorithms with parallelization (OpenMP)

skipping wrapper generation for arithmetic plugin (output up-to-date)
skipping wrapper generation for binarization plugin (output up-to-date)
skipping wrapper generation for color plugin (output up-to-date)
skipping wrapper generation for contour plugin (output up-to-date)
skipping wrapper generation for convolution plugin (output up-to-date)
skipping wrapper generation for corelation plugin (output up-to-date)
skipping wrapper generation for deformation plugin (output up-to-date)
skipping wrapper generation for draw plugin (output up-to-date)
skipping wrapper generation for edgedetect plugin (output up-to-date)
skipping wrapper generation for features plugin (output up-to-date)
skipping wrapper generation for fourier_features plugin (output up-to-date)
skipping wrapper generation for geometry plugin (output up-to-date)
skipping wrapper generation for gui_support plugin (output up-to-date)
skipping wrapper generation for image_conversion plugin (output up-to-date)
skipping wrapper generation for image_utilities plugin (output up-to-date)
skipping wrapper generation for listutilities plugin (output up-to-date)
skipping wrapper generation for logical plugin (output up-to-date)
skipping wrapper generation for misc_filters plugin (output up-to-date)
skipping wrapper generation for misc_free_functions plugin (output up-to-date)
skipping wrapper generation for morphology plugin (output up-to-date)
skipping wrapper generation for pagesegmentation plugin (output up-to-date)
skipping wrapper generation for png_support plugin (output up-to-date)
skipping wrapper generation for projections plugin (output up-to-date)
skipping wrapper generation for runlength plugin (output up-to-date)
skipping wrapper generation for segmentation plugin (output up-to-date)
skipping wrapper generation for string_io plugin (output up-to-date)
skipping wrapper generation for structural plugin (output up-to-date)
skipping wrapper generation for thinning plugin (output up-to-date)
skipping wrapper generation for threshold plugin (output up-to-date)
skipping wrapper generation for tiff_support plugin (output up-to-date)
skipping wrapper generation for transformation plugin (output up-to-date)
Traceback (most recent call last):
File "setup.py", line 228, in
import wx
File "/home/mrblue/.local/lib/python3.6/site-packages/wx/init.py", line 17, in
from wx.core import *
File "/home/mrblue/.local/lib/python3.6/site-packages/wx/core.py", line 12, in
from ._core import *
ImportError: libpng12.so.0: cannot open shared object file: No such file or directory

$ sudo apt install libpng16-16
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpng16-16 is already the newest version (1.6.34-1ubuntu0.18.04.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt-get install g++ python python-dev python-wxgtk2.8 python-wxversion libtiff4-dev libpng12-dev python-docutils python-pygments
[sudo] password for mrblue:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libpng12-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libtiff4-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libtiff5-dev

Package python-wxgtk2.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-wxgtk2.8' has no installation candidate
E: Package 'libtiff4-dev' has no installation candidate
E: Package 'libpng12-dev' has no installation candidate

$ sudo dpkg -i ./libpng12-dev_1.2.54-1ubuntu1.1_amd64.deb
Selecting previously unselected package libpng12-dev:amd64.
(Reading database ... 56917 files and directories currently installed.)
Preparing to unpack .../libpng12-dev_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-dev:amd64 (1.2.54-1ubuntu1.1) ...
dpkg: dependency problems prevent configuration of libpng12-dev:amd64:
libpng12-dev:amd64 depends on libpng12-0 (= 1.2.54-1ubuntu1.1); however:
Package libpng12-0 is not installed.
libpng12-dev:amd64 depends on zlib1g-dev; however:
Package zlib1g-dev is not installed.

dpkg: error processing package libpng12-dev:amd64 (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Errors were encountered while processing:
libpng12-dev:amd64

$ sudo gdebi libpng12-dev_1.2.54-1ubuntu1.1_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libpng12-0 (= 1.2.54-1ubuntu1.1)

$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

$ uname -a
Linux LAPTOP-GST0Q31R 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux

It's "Windows Subsystem for Linux" (Yes, Linux on windows 10... hum...)

Same problem with python 2.7 and Gamera-3.4.4, or Python 3.8 and Gamera-4-0.pre in two different virtualenv.

cannot find -ltiff

$ python3 setup.py build
Gamera version: 4.0.pre
Compiling genetic algorithms with parallelization (OpenMP)

skipping wrapper generation for arithmetic plugin (output up-to-date)
skipping wrapper generation for binarization plugin (output up-to-date)
skipping wrapper generation for color plugin (output up-to-date)
skipping wrapper generation for contour plugin (output up-to-date)
...
...
...
...

x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/path/gamera-4.0.pre/gamera/plugins/_tiff_support.o -ltiff -lstdc++ -o build/lib.linux-x86_64-3.6/gamera/plugins/_tiff_support.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -ltiff
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1

$ sudo apt install libtiff5
Reading package lists... Done
Building dependency tree
Reading state information... Done
libtiff5 is already the newest version (4.0.9-5ubuntu0.3).
libtiff5 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

On ubuntu 18

SetuptoolsDeprecationWarning: Installing as data is deprecated

Running python -m pip install --verbose . reports some warnings:

/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.include.gamera' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.include.gamera' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.include.gamera' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.include.gamera' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.include.gamera.geostructs' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.include.gamera.geostructs' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.include.gamera.geostructs' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.include.gamera.geostructs' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.include.gamera.graph' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.include.gamera.graph' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.include.gamera.graph' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.include.gamera.graph' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.include.gamera.plugins' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.include.gamera.plugins' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.include.gamera.plugins' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.include.gamera.plugins' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.include.gamera.vigra' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.include.gamera.vigra' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.include.gamera.vigra' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.include.gamera.vigra' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.pixmaps' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.pixmaps' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.pixmaps' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.pixmaps' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.src.geostructs' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.src.geostructs' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.src.geostructs' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.src.geostructs' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.src.graph' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.src.graph' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.src.graph' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.src.graph' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.src.graph.graphmodule' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.src.graph.graphmodule' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.src.graph.graphmodule' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.src.graph.graphmodule' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)
  /opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'gamera.test' as data is deprecated, please list it in `packages`.
      !!
      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'gamera.test' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
      'gamera.test' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
      Please make sure that 'gamera.test' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  !!
    check.warn(importable)

Related upstream issue: pypa/setuptools#3340

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.