DigitalSlideArchive / HistomicsTK

A Python toolkit for pathology image analysis algorithms.
https://digitalslidearchive.github.io/HistomicsTK/
Apache License 2.0
394 stars 117 forks source link

Error in importing histomicsTK on python 3.6.1 #551

Closed anilk991 closed 5 years ago

anilk991 commented 6 years ago

I get following message when I try to import histomicstk:

Python 3.6.1 (default, Sep 11 2018, 02:16:25) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.

import histomicstk INFO:root:Created LRU Cache for 'tilesource' with 83 maximum size INFO:root:Notice: Could not import MapnikTileSource Traceback (most recent call last): File "", line 1, in File "/home/anil/large_image/HistomicsTK/histomicstk/init.py", line 5, in from . import utils # must be imported before other packages File "/home/anil/large_image/HistomicsTK/histomicstk/utils/init.py", line 19, in from .sample_pixels import sample_pixels # must import after SimpleMask File "/home/anil/large_image/HistomicsTK/histomicstk/utils/sample_pixels.py", line 114 print "Sampling could not identify any foreground regions." ^ SyntaxError: Missing parentheses in call to 'print'

Is histomicstk a python 2 package?

cdeepakroy commented 6 years ago

Yes it is still not entirely Python 3 compatible. We are actively working on the port to Python 3 and we expect it to come soon.

Tsakunelson commented 5 years ago

I am having exactly the same issue as you @anilk991. Did you solve the problem? image I happens to be a MapnikTileSource dependency from the Mapnik package required by large_image. Any solutions to this issue? @cdeepakroy

manthey commented 5 years ago

You probably don't need to the mapnik tilesource -- it is for geospatial images, such as geotiff, netcdf. The notice that it can't import is informative, rather than an error. If you need to work with geospatial images, you can install mapnik and gdal, but if not you can safely ignore this.

manthey commented 5 years ago

We now explicitly test with Python 2.7, 3.5, and 3.6.