admin管理员组

文章数量:1122846

AttributeError: module 'turbojpeg' has no attribute 'TurboJPEG' on Mac.

The full error is:

    AttributeError                            Traceback (most recent call last)
Cell In[5], line 8
      6 from PIL import Image
      7 from huggingface_hub import hf_hub_download
----> 8 from sgblur.src.blur.blur import blurPicture
      9 from turbojpeg import TurboJPEG
     11 # Set paths

File ~/Desktop/Pyronear/sgblur/src/blur/blur.py:11
      8 import json, uuid
      9 import requests
---> 11 jpeg = turbojpeg.TurboJPEG()
     13 crop_save_dir = '/data/crops'
     15 def blurPicture(picture, keep):

AttributeError: module 'turbojpeg' has no attribute 'TurboJPEG'. I installed it with this link: 

I tried to uninstall install in several ways. On windows this looks different:

Indeed: Fatemeh-MA commented on Aug 8, 2019 I think I found the solution, I had the same problem. you need to use "libjpeg-turbo-vc" version instead of "libjpeg-turbo-gcc". it works for me. best luck

But there is no such version for mac. Even chatgpt is looping on this question.

There might be something with python version (tried 3.11 and a brew link to 3.13 as well) or numpy version.

It is to use this algorithm on mac:

本文标签: AttributeError module 39turbojpeg39 has no attribute 39TurboJPEG39 on MacStack Overflow