labelme的安装
首先尝试在(openmmlab)的python3.8的环境下安装(失败)。应该是我环境其他部分不对,和python版本应该没什么关系。(后续,创建新的环境后成功,可直接看最后一部分。)
首先安装是没问题的
pip install labelme
输入labelme运行时报错:
错误1:
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/lb/anaconda3/envs/openmmlab/lib/python3.8/site-packages/scipy/linalg/_matfuncs_sqrtm_triu.cpython-38-x86_64-linux-gnu.so)
?解决报错1:
查看:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
发现确实没有,查看 当前环境下(openmmlab)的lib,发现有GLIBCXX_3.4.26
strings /home/lb/anaconda3/envs/openmmlab/lib/libstdc++.so.6 | grep GLIBCXX
于是先做好备份:
备份到桌面
sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /home/lb/desktop
然后删除
sudo rm /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /home/lb/desktop
最后复制
sudo cp /home/lb/anaconda3/envs/openmmlab/lib/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/
报错1解决。
错误2:
2024-01-07 18:48:46,142 [INFO?? ] __init__:get_config:67- Loading config file from: /home/lb/.labelmerc
QObject::moveToThread: Current thread (0x55e8ac1e3d00) is not the object's thread (0x55e8ad8ae450).
Cannot move to target thread (0x55e8ac1e3d00)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/lb/anaconda3/envs/openmmlab/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.
已放弃 (核心已转储)
?
解决错误2:
qt版本太高引起的
pip install pyqt5==5.14.0
错误3:
Traceback (most recent call last):
? File "/home/lb/anaconda3/envs/openmmlab/bin/labelme", line 5, in <module>
??? from labelme.__main__ import main
? File "/home/lb/anaconda3/envs/openmmlab/lib/python3.8/site-packages/labelme/__init__.py", line 6, in <module>
??? from qtpy import QT_VERSION
? File "/home/lb/anaconda3/envs/openmmlab/lib/python3.8/site-packages/qtpy/__init__.py", line 287, in <module>
??? raise QtBindingsNotFoundError from None
qtpy.QtBindingsNotFoundError: No Qt bindings could be found
未解决
找了一会问题,没找到问题所在!咱头也不铁,重新创建环境,以前的电脑是python3.7可以运行,这次直接安装3.7的环境。
开始安装
conda create -n labelme python=3.7
conda activate labelme
conda install pyqt
pip install labelme
报错
? File "/home/lb/anaconda3/envs/labelme/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
??? raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
显然是超时了
解决方法:
换个源pip
pip install labelme -i https://pypi.tuna.tsinghua.edu.cn/simple
安装成功!
终端输入
labelme
可以开始标注了!?
?
?
?
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!