Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

labelImg crashes at launch when installed as an app on macOS #321

Open
LucasVandroux opened this issue Jul 1, 2018 · 4 comments
Open

labelImg crashes at launch when installed as an app on macOS #321

LucasVandroux opened this issue Jul 1, 2018 · 4 comments

Comments

@LucasVandroux
Copy link

Hello I tried to follow the instructions in the README.rst to install labelImg as an app on macOS but I have the following error message "labelImg has encountered a fatal error, and will now terminate." when I am trying to launch it once I successfully completed the installation:

screen shot 2018-07-01 at 19 51 34

I used this manual installation:

brew install python3
pip install pipenv
pipenv --three
pipenv shell
pip install py2app
pip install PyQt5 lxml
make qt5py3
rm -rf build dist
python setup.py py2app -A
mv "dist/labelImg.app" /Applications

Moreover, I had to modify my ~/.bash_profile. to solve a localization problem when using pipenv --three. I added the following lines (source):

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

I don't know if this could be the problem or not but I am also using Anaconda and therefore my python version is the following: Python 3.6.5 :: Anaconda, Inc.

Thanks a lot for your time.

  • OS: macOS High Sierra 10.13.15
  • PyQt version: PyQt5
@vdalv
Copy link
Contributor

vdalv commented Jul 1, 2018

Thanks for bringing this to our attention, I'll try to take a look into it when I get the chance.

But in the meantime I would recommend running labelImg from the "Python 3 + Qt5 (Works on macOS High Sierra)" instructions here

@nekulkarni
Copy link

Has there been any progress on this issue?

@rathisowumyat
Copy link

I was able to get this running:
Execute these:
brew install python3
pip install pipenv
pipenv --three
pipenv shell
pip install py2app
pip install PyQt5 lxml
Unzip the labelImg downloaded from https://github.com/tzutalin/labelImg , and execute the following
cd labelImg-master
brew install qt qt5
brew install libxml2
brew install pyqt5
make qt5py3
rm -rf build dist
python setup.py py2app -A
mv "dist/labelImg.app" /Applications
this should fix it.

@elemag1414
Copy link

I encountered the same error message.

This happens if the python framework is not found when running py2app.

So what I recommend is like the following:

  1. copy libpython3.6m.pylib and libpython3.6m.a to libpython3.6.pylib and libpython3.6.a
    -> Those files are located on your anaconda python virtual environment, like User/user/anaconda3/envs/LabelImg/lib/ in my case.
    Note, LabelImg is the name of the virtual env. So, it may be different in your case.
  2. run setup again, like "$ python setup.py py2app"
    -> You can check if it works by running "open ./dist/labelImg.app/". If it works then, move the app to /Applications folder.

This is how I fix the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants