Comments (3)
You have to install reportlabs as specified in the dependencies.
from easy-thumbnails.
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.
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:
- [reportlab-users] Symbol not found in flat namespace when running on macOS 12.0.1
- [reportlab-users] Fwd: Symbol not found in flat namespace when running on macOS 12.0.1
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)
- Reportlab dependency causes security warning HOT 9
- Cant install easy-thumbnails with Poetry and Django 4 HOT 4
- Template fails to render due to ZeroDivisionError when input is corrupted
- ContentFile without a name breaks easy_thumbnails
- ANTIALIAS is deprecated and will be removed in Pillow 10
- svglib dependency is missing HOT 9
- Imoprt error
- Django 4.1 template tag 'thumbnail' conflict with sorl-thumbnails
- Saving TIFF image raises Value error HOT 2
- How to force a single field to convert the thumbails to JPG even if PNG with alpha was provided
- DeprecationWarning from get_storage_class HOT 1
- Lots of duplicated queries HOT 1
- Support for pillow >= 10.0.0.0 HOT 1
- SVG File.width - This backend doesn't support absolute paths. HOT 2
- ZeroDivisionError when thumbnail is passed a 0x0 SVG HOT 1
- Increase File name field length HOT 1
- Allow use of new Django4.2 STORAGE config
- animated gifs - preserve animation, as PIL/Pillow supports it HOT 3
- up to date docs?
- Data too long on serving thumbnails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easy-thumbnails.