Git Product home page Git Product logo

Comments (9)

code807 avatar code807 commented on June 15, 2024 5

Ok so I finally figured out what this is. ImageWriter tries to import Image, which used to come from PIL, (Python Image Library) which is no longer supported or included with Python. This issue can be remedied by installing Pillow, which is a working fork of PIL.

Side note: Pretty sure this makes Pillow a dependency for python-barcode.

from python-barcode.

WhyNotHugo avatar WhyNotHugo commented on June 15, 2024 2

Pillow is listed as an optional dependency, not PIL.
Some docs still have outdated PIL references, so I've updated these.

from python-barcode.

JWarmenhoven avatar JWarmenhoven commented on June 15, 2024

It runs when using writer=ImageWriter, but then an SVG image is created. Not a PNG.

from python-barcode.

WhyNotHugo avatar WhyNotHugo commented on June 15, 2024

from python-barcode.

code807 avatar code807 commented on June 15, 2024

I see it now. Maybe PIL should be specified or linked as pillow? PIL is no longer entirely accurate, since only a fork works.

from python-barcode.

wellmonwu avatar wellmonwu commented on June 15, 2024

pls ,update PIL to Pillow for python3, and add the Pillow dependency to be must when pip install python-barcode

from python-barcode.

WhyNotHugo avatar WhyNotHugo commented on June 15, 2024

@wellmonwu Please see previous comments. PIL has never been listed as a dependency; only pillow. Also, python2 has never supported, only python3.

Finally, pillow is only required if you're exporting image files (eg: not svg), so it will always be listed as an optional dependency, not a"must".

from python-barcode.

DannyDannyDanny avatar DannyDannyDanny commented on June 15, 2024

@WhyNotHugo Perhaps this could explicitly be stated in the error.

@wellmonwu Please see previous comments. PIL has never been listed as a dependency; only pillow. Also, python2 has never supported, only python3.

Finally, pillow is only required if you're exporting image files (eg: not svg), so it will always be listed as an optional dependency, not a"must".

from python-barcode.

wellmonwu avatar wellmonwu commented on June 15, 2024

from python-barcode.

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.