Comments (13)
for me this was due to a name clash with this module.
Solution:
pip uninstall barcode
pip install python-barcode
from python-barcode.
I've no idea why that works for you or how your setup is laid out, but happy it works for you. I suspect you either have two pythons, or two different environment configurations somewhere.
Glad you figured it out.
from python-barcode.
this are not working. please help me
from python-barcode.
No idea what to say here. I haven't used any of the tools you mention, but it would seem they're using a different python.
I expect that you'll get this error for any library you install, right?
from python-barcode.
Can you do the following:
- On you editor, run this code and what does it output?
import sys; sys.path
- On the same console you ran
pip install
, what does this output?python -c "import sys; print(sys.path)"
And this?pip --version
?
This should help figure out if they're using different pythons.
from python-barcode.
I got same problem.
ModuleNotFoundError: No module named 'barcode.writer'; 'barcode' is not a package
But it's working fine only on this folder: C:\Program Files\Python38\Lib\site-packages\tests
Can you help me fix this problem.
Folder: C:\Program Files\Python38\Lib\site-packages\barcode
pip 20.2b1 from c:\program files\python38\lib\site-packages\pip-20.2b1-py3.8.egg\pip (python 3.8)
>>> print(sys.path)
['D:\\GG\\1.Hung\\My Code\\Pro1', 'C:\\Program Files\\Python38\\python38.zip', 'C:\\Program Files\\Python38\\DLLs', 'C:\\Program Files\\Python38\\lib', 'C:\\Program Files\\Python38', 'C:\\Users\\Mr Shin Heo\\AppData\\Roaming\\Python\\Python38\\site-packages', 'C:\\Program Files\\Python38\\lib\\site-packages', 'C:\\Program Files\\Python38\\lib\\site-packages\\pip-20.2b1-py3.8.egg', 'C:\\Program Files\\Python38\\lib\\site-packages\\win32', 'C:\\Program Files\\Python38\\lib\\site-packages\\win32\\lib', 'C:\\Program Files\\Python38\\lib\\site-packages\\Pythonwin']
$ python -c "import sys; print(sys.path)"
['', 'C:\\Program Files\\Python38\\python38.zip', 'C:\\Program Files\\Python38\\DLLs', 'C:\\Program Files\\Python38\\lib', 'C:\\Program Files\\Python38', 'C:\\Users\\Mr Shin Heo\\AppData\\Roaming\\Python\\Python38\\site-packages', 'C:\\Program Files\\Python38\\lib\\site-packages', 'C:\\Program Files\\Python38\\lib\\site-packages\\pip-20.2b1-py3.8.egg', 'C:\\Program Files\\Python38\\lib\\site-packages\\win32', 'C:\\Program Files\\Python38\\lib\\site-packages\\win32\\lib', 'C:\\Program Files\\Python38\\lib\\site-packages\\Pythonwin']
[Edit: formatting was unreadable. @WhyNotHugo]
from python-barcode.
I've no idea how Python works on windows, but it seems that when you ran print(sys.path)
, the list of directories where python searches for packages had an extra entry (the first one) compared to when you did python -c "import sys; print(sys.path)"
.
This indicates that the environment for both runs is different.
How did you run python
when you ran print(sys.path)
? Via an IDE? Is this where importing barcode
does work?
from python-barcode.
I found a solution: copy Tests folder from here : C:\Program Files\Python38\Lib\site-packages\tests
And create new file .py on this folder: Barcode is working fine.
from python-barcode.
for me this was due to a name clash with this module. Solution:
pip uninstall barcode pip install python-barcode
This worked miracles for me, thanks!
from python-barcode.
for me this was due to a name clash with this module. Solution:
pip uninstall barcode pip install python-barcode
Intellij automatically installed the shorter named library for me. This fix worked for me as well.
from python-barcode.
Odd. The barcode
package had been abandoned for years, hence this fork. Looks like there's a new package published under that name now.
from python-barcode.
this is absolutely working and hopefully it will resolve your issue
pip uninstall barcode
pip install python-barcode
from python-barcode.
@sahad-cp Nobody can help if you don't describe your problem. Please open a new issue and explain what's not working and what you've tried.
from python-barcode.
Related Issues (20)
- How to use with Pillow image
- ISBN-13 starting with 979 HOT 1
- Text placement in ImageWriter HOT 2
- UPC/UPCA final output doesn't include guard bars HOT 1
- Add some form of tests reading the barcodes
- no support for MSI (Plessey) barcodes HOT 2
- EAN13 calculate_checksum() generates inconsistent values HOT 6
- better formating for GS1_128 HOT 1
- Unable to generate PNG using pillow 10 HOT 3
- dpi HOT 1
- generating barcode error HOT 1
- Unexpected ">" symbol at the end of generated EAN-13 barcode HOT 2
- module_width not working HOT 1
- invalid ppem value with 0.15.1 but not with 0.14.0 HOT 5
- Incompatibility with pillow 10.0.1 HOT 10
- Error on the number generated HOT 11
- Redable text under bars is cut out from the image HOT 2
- Support for Code128 FNC4 / ISO-8859-1
- Why does `Barcode.build()` always return a singleton list? HOT 2
- GS1-128 images are cut-off HOT 4
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 python-barcode.