Giter Site home page Giter Site logo

Comments (3)

jrief avatar jrief commented on July 2, 2024

You have to install reportlabs as specified in the dependencies.

from easy-thumbnails.

Sawrz avatar Sawrz commented on July 2, 2024

I can't confirm that it's the solution to the problem. For example, I run an M1 Max processor, and I get the same error. Suffice to say that reportlabs and the other dependencies are installed. I tried to install the dependencies manually in case something went wrong, but everything was already there. Version 2.7.2 works fine, as @xobed mentioned. Maybe something about the ARM architecture of the M1 chips version 2.8.0 or a dependency doesn't like. I remember scipy having a similar problem where installing on an M1 machine wasn't possible.

The error occurred during the migration process. Here are all packages installed on my venv for my Django project:

asgiref==3.4.1
bleach==4.1.0
cssselect2==0.4.1
Django==3.2.9
django-bleach==1.0.0
django-environ==0.8.1
easy-thumbnails==2.7.2
flashtext==2.7
gunicorn==20.1.0
lxml==4.7.1
Markdown==3.3.6
numpy==1.21.4
packaging==21.3
Pillow==8.4.0
psycopg2==2.9.2
pyparsing==3.0.6
pytz==2021.3
reportlab==3.6.3
six==1.16.0
sqlparse==0.4.2
svglib==1.1.0
tinycss2==1.1.1
webencodings==0.5.1

from easy-thumbnails.

bhrutledge avatar bhrutledge commented on July 2, 2024

I think this issue should be re-opened due to what seems like a bug in reportlab, which seems to be discussed in these threads:

I was able to reproduce this in a fresh Python 3.9 virtual environment on an M1 MacBook Air:

% python3 -m venv venv-reportlab && source venv-reportlab/bin/activate

% python3 -V
Python 3.9.6

% pip install -U setuptools pip wheel

% pip install easy-thumbnails
...
Successfully installed asgiref-3.5.0 cssselect2-0.4.1 django-4.0.2 easy-thumbnails-2.8.1 lxml-4.8.0 svglib-1.2.1

% python3 -c "from easy_thumbnails.VIL.Image import load"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/venv-reportlab/lib/python3.9/site-packages/easy_thumbnails/VIL/Image.py", line 7, in <module>
    from reportlab.graphics import renderSVG
  File "/private/tmp/venv-reportlab/lib/python3.9/site-packages/reportlab/graphics/renderSVG.py", line 22, in <module>
    from .renderPM import _getImage
  File "/private/tmp/venv-reportlab/lib/python3.9/site-packages/reportlab/graphics/renderPM.py", line 20, in <module>
    from .utils import setFont as _setFont, RenderPMError
  File "/private/tmp/venv-reportlab/lib/python3.9/site-packages/reportlab/graphics/utils.py", line 9, in <module>
    from . _renderPM import makeT1Font
ImportError: dlopen(/private/tmp/venv-reportlab/lib/python3.9/site-packages/reportlab/graphics/_renderPM.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_FT_Done_Face'

A workaround is to install reportlab from source:

% pip freeze | xargs pip uninstall -y

% pip install --no-binary reportlab easy-thumbnails
...
  Running setup.py install for reportlab ... done
Successfully installed asgiref-3.5.0 cssselect2-0.4.1 django-4.0.2 easy-thumbnails-2.8.1 lxml-4.8.0 pillow-9.0.1 reportlab-3.6.7 sqlparse-0.4.2 svglib-1.2.1 tinycss2-1.1.1 webencodings-0.5.1

% python3 -c "from easy_thumbnails.VIL.Image import load"

from easy-thumbnails.

Related Issues (20)

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.