HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.51k stars 6.27k forks source link

ImportError: DLL load failed: %1 is not a valid Win32 application. #837

Open PaVaNTrIpAtHi opened 2 years ago

PaVaNTrIpAtHi commented 2 years ago

I was trying to open the labelimg annotator tool. it worked for the first time after installation but throws an error now. Would be glad if help is provided.

(labelimg) E:\labelImg-master>python labelImg.py Traceback (most recent call last): File "labelImg.py", line 43, in from libs.labelFile import LabelFile, LabelFileError, LabelFileFormat File "E:\labelImg-master\libs\labelFile.py", line 10, in from libs.pascal_voc_io import PascalVocWriter File "E:\labelImg-master\libs\pascal_voc_io.py", line 6, in from lxml import etree ImportError: DLL load failed: %1 is not a valid Win32 application.

PaVaNTrIpAtHi commented 2 years ago

got it resolved. first used try except for checking if i was able to import required package. try: from lxml import etree print("running with lxml.etree !") except ImportError: print("Import etree from lxml failed !")

got ("Import etree from lxml failed !")

then installed lxml using this pip install lxml --force -U and was able to run python labelImg.py