Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work out how to build static binary executables for OSX #26

Closed
inglesp opened this issue Dec 13, 2015 · 5 comments
Closed

Work out how to build static binary executables for OSX #26

inglesp opened this issue Dec 13, 2015 · 5 comments

Comments

@inglesp
Copy link
Contributor

inglesp commented Dec 13, 2015

No description provided.

@inglesp
Copy link
Contributor Author

inglesp commented Jan 3, 2016

I'm running into problems with getting PyInstaller to build something on OSX. The build process apparently completes successfully, but when I come to run the application, I get exception ImportError: No module named 'PyQt5.Qsci'.

@carlosperate or anybody else, do you have any ideas for how I can go about debugging this?

@carlosperate
Copy link
Member

I assumed instaling Qsci was a different step than what is currently on the install_osx.sh file, mostly because of the import error you mention, and because I had to sudo apt-get install python3-pyqt5.qsci in ubuntu to get it to run.

Is your build environment able to launch the python program without throwing he same import error? If so, there is a small chance that PyInstaller is not figuring out the import requirements properly, and it can be added to the spec file as a "hidden import", however there is a clear dependency in the editor.py file, so I'd be surprised if that would solve it.

There is also a chance that it might be a fixed bug in PyInstaller. You check that by downloading the source code directly from github and run that pyinstaller.py file instead of the pyinstaller command.

@inglesp
Copy link
Contributor Author

inglesp commented Jan 4, 2016

Thanks @carlosperate for your input. I am able to launch the Python program without any problems -- I probably should've made that clearer yesterday!

build/pyinstaller/warnpyinstaller.txt contains a bunch of warnings about missing modules, which includes:

missing module named 'PyQt5.Qsci'.QsciLexerPython - imported by 'PyQt5.Qsci', mu.editor
missing module named 'PyQt5.Qsci'.QsciScintilla - imported by 'PyQt5.Qsci', mu.editor
missing module named 'PyQt5.Qsci' - imported by mu.editor

Further digging shows that PyInstaller is trying to load the QSci module from the wrong directory -- it's looking in /usr/local/Cellar/pyqt5/5.5.1/lib/python3.5/site-packages/PyQt5, but it should be looking in /usr/local/lib/python3.5/site-packages/PyQt5.

The first path is where homebrew puts the packages before symlinking them to the second path. I'll need to spend some more time getting cosy with pdb to work out why it's looking in the second path.

@inglesp
Copy link
Contributor Author

inglesp commented Jan 5, 2016

Ooh ooh ooh, I've commented out two lines in PyInstaller, and I've got something to work! See pyinstaller/pyinstaller#1750 for details.

@carlosperate
Copy link
Member

That's great progress @inglesp! Let's see how the bug report goes, if it gets fixed on their git repository we can always pull that on the travis ci installation script. If not, we could have a bit of a hacky-temporary-solution to clone and apply a patch before using PyInstaller.

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

No branches or pull requests

3 participants