Create a labelme environment using a virtual environment:
According to the official guidelines, link: GitHub – wkentaro/label: image polygon annotation with python (polygon, rectangle, circle, line, point and image level flag annotation)
conda create --name=labelme python=3
source activate labelme
pip install labelme
Question 1:
gcc -pthread -B /home/XXX/fxp/envs/labelme/compiler_compat -Wno-unused-
result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem
/home/XXX/fxp/envs/labelme/include -fPIC -O2 -isystem
/home/XXX/fxp/envs/labelme/include -fPIC -DFREETYPE_BUILD_TYPE=system -
DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -
DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -
Iextern/agg24-svn/include -I/home/XXX/fxp/envs/labelme/lib/python3.10/site-
packages/numpy/core/include -I/home/XXX/fxp/envs/labelme/include/python3.10
-c src/checkdep_freetype2.c -o build/temp.linux-x86_64-cpython-
310/src/checkdep_freetype2.o
src/checkdep_freetype2.c:3:6: error: #error "FreeType version 2.3 or higher
is required. You may set the MPLLOCALFREETYPE environment variable to 1 to let
Matplotlib download it."
#error "FreeType version 2.3 or higher is required. \
^~~~~
src/checkdep_freetype2.c:10:10: error: #include expects "FILENAME" or
<FILENAME>
#include FT_FREETYPE_H
^~~~~~~~~~~~~
src/checkdep_freetype2.c:15:9: note: #pragma message: Compiling with FreeType version FREETYPE_MAJOR.FREETYPE_MINOR.FREETYPE_PATCH.
#pragma message("Compiling with FreeType version " \
^~~~~~~
src/checkdep_freetype2.c:18:4: error: #error "FreeType version 2.3 or higher
is required. You may set the MPLLOCALFREETYPE environment variable to 1 to let Matplotlib download it."
#error "FreeType version 2.3 or higher is required. \
^~~~~
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with
pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> matplotlib
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Relevant dependent libraries need to be installed:
sudo apt-get update
sudo apt-get install libfreetype6-dev
sudo apt-get install pkg-config
sudo apt-get install libpng12-dev
sudo apt-get install pkg-config
Error 2 encountered:
labelme
[INFO ] __init__:get_config:70 - Loading config file from: /home/XXX/.labelmerc
Traceback (most recent call last):
File "/home/XXX/fxp/envs/labelme/lib/python3.10/site-packages/labelme/widgets/canvas.py", line 618, in paintEvent
p.translate(self.offsetToCenter())
File "/home/XXX/fxp/envs/labelme/lib/python3.10/site-packages/labelme/widgets/canvas.py", line 659, in offsetToCenter
return QtCore.QPoint(x, y)
TypeError: arguments did not match any overloaded call:
QPoint(): too many arguments
QPoint(int, int): argument 1 has unexpected type 'float'
QPoint(QPoint): argument 1 has unexpected type 'float'
Aborted (core dumped)
Reference link: https://github.com/wkentaro/labelme/issues/1006
I guess the python version is too high, so I recreated the virtual environment with pyhton = 3.9
conda create --prefix=/home/fxp/envs/labelme python=3.9 -y
The final installation is successful;
Read More:
- How to Solve Xmind Install Error in Ubuntu System
- mysqlclient in Ubuntu: How to Solve mysqlclient Install Error
- How to Solve Mujoco Install Error in Ubuntu (Pycharm Run Error)
- Ubuntu Server: How to Install Chrome
- How to Solve Ubuntu “Failed to fetch” Error
- Ubuntu20.04 install the ROS noetic version in catkin_Problems in make compilation
- How to Solve Ubuntu20.04 Compile Error:error while loading shared libraries: libncurses.so.5
- Linux: How to Solve Rabbitmq Plug-in Install Error
- Ubuntu18.04 Install ROS Error: rosdep update [How to Solve]
- [Solved] Any Softwares Install Error in Ubuntu: /usr/bin/dpkg returned an error code
- [Solved] Ubuntu 20.04 install MATLAB and toolbox permissions Error
- [Solved] Ubuntu20.04 Error: “Failed to install the following Android SDK packages as some licences have not..“error
- How to Fix Ubuntu(Linux) mount error(22)
- How to Uncompress 7z files on Ubuntu, Debian, Fedora
- [Solved] Ubuntu pip Install Error: which is not on PATH
- How to Solve Error: Address already in use
- How to Solve Rosep Problem in ROS Initialization (Sudo Rosep Init)
- Ubuntu 20.04 Desktop Install sublime-text Error: “Certificate verification failed”
- [Solved] Ubuntu16.4Install vcs2016 Error: mount.vboxsf: mounting failed with the error: Invalid argument
- ubuntu install package Error: subprocess installed post-installation script returned error exit status 10