I am using python 3.7, for barcode generation I am trying to install pyBarcode library using pip install pyBarcode
'. but it shows the following error:
Could not find a version that satisfies the requirement pyBarcode (from versions: ) no matching distribution found for pyBarcode
Now, how can I install pyBarcode
for my Python version?
1st install the right lib:
pip install python-barcode
then code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import barcode
from barcode.writer import ImageWriter
def testEan():
EAN = barcode.get_barcode_class('ean13')
ean = EAN(u'123456789011', writer=ImageWriter())
fullname = ean.save('my_ean13_barcode')
if __name__ == '__main__':
testEan()
this code produces
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With