klauscc / jpeg_toolbox_python

extract the dct coefficient of jpeg images. Provide c and python interface.
16 stars 8 forks source link

Unable to run using python3.6 #1

Closed YuvalBahat closed 4 years ago

YuvalBahat commented 4 years ago

Hi, I have been trying to use this important code using python 3.6. I followed the compilation instructions which terminated without errors, but then when I'm trying to run test_jpeg_read_python.py I get the following error: E ModuleNotFoundError: No module named '_jpegtools'

I did some reading, and found that this probably has to do with incompatibility between python versions used by pyhon-boost and the one I'm using. Unfortunately, I'm unfamiliar with python-boost... I'd be grateful for any help I can get on this. Thanks!

klauscc commented 4 years ago

It's the import problem. Replacing import _jpegtools with from . import _jpegtools in file python/jpegtools/__init__.py will fix it. I already merged it into the master branch.

YuvalBahat commented 4 years ago

Now it works. Thanks a lot!