PaddleOCR
PaddleOCR copied to clipboard
No module named 'libs.labelColor'
I just don't know why -_-
Traceback (most recent call last):
File "C:\Users\Aquiko\miniconda3\envs\open-mmlab\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Aquiko\miniconda3\envs\open-mmlab\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Aquiko\miniconda3\envs\open-mmlab\Scripts\PPOCRLabel.exe\__main__.py", line 4, in <module>
File "C:\Users\Aquiko\miniconda3\envs\open-mmlab\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 43, in <module>
from libs.labelColor import label_colormap
ModuleNotFoundError: No module named 'libs.labelColor'
I just install it, I followed the instruction and when I try to run it, it will cause an error
https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.5/PPOCRLabel/libs/labelColor.py
Is labelColor.py in your directory?
https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.5/PPOCRLabel/libs/labelColor.py
Is labelColor.py in your directory? 找了找,发现labelColor.py 在PPOCRLabel/libs/下面,但是还报错!
有解决这个问题的兄弟没
I finally solve this problem.
Please only install labelImg or PPOCRLabel one, because both of them have libs
python package installed from pip.
For labelImg:
/home/xxx/.local/bin/labelImg
/home/xxx/.local/lib/python3.8/site-packages/labelImg-1.8.6.dist-info/*
/home/xxx/.local/lib/python3.8/site-packages/labelImg/*
/home/xxx/.local/lib/python3.8/site-packages/libs/*
So run pip uninstall labelImg
then run PPOCRLabel again works.
I finally solve this problem. Please only install labelImg or PPOCRLabel one, because both of them have
libs
python package installed from pip.For labelImg:
/home/xxx/.local/bin/labelImg /home/xxx/.local/lib/python3.8/site-packages/labelImg-1.8.6.dist-info/* /home/xxx/.local/lib/python3.8/site-packages/labelImg/* /home/xxx/.local/lib/python3.8/site-packages/libs/*
So run
pip uninstall labelImg
then run PPOCRLabel again works. 你好我刚才试了一下,这个办法好像不太行,这个办法不太行。请问你还修改过其他东西嘛
Maybe you shou try print your libs path or file(run python not in PPOCRLabel package, should in other path).
import libs
print(libs.__path__) # or libs.__file__
进入安装PPOCRLabel环境的,找到PPOCRLabel.py 地址(我的在如下地址 \Lib\site-packages\PPOCRLabel\),使用python PPOCRLabel.py 运行这个脚本可以打开这个工具。不会报上面那个错。
有解决这个问题的兄弟没
我这边是与labelimg冲突了。把PPOCRLabel的libs文件夹改为libs2。同时把代码内所有关于libs的引用改为libs2就可以了。 I am experiencing a conflict with labelimg here. Change the 'libs' folder in PPOCRLabel to 'libs2'. At the same time, change all the references to 'libs' within the code to 'libs2', and it should work.