Giter Site home page Giter Site logo

Comments (5)

inglesp avatar inglesp commented on May 21, 2024

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?

from mu.

carlosperate avatar carlosperate commented on May 21, 2024

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.

from mu.

inglesp avatar inglesp commented on May 21, 2024

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.

from mu.

inglesp avatar inglesp commented on May 21, 2024

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

from mu.

carlosperate avatar carlosperate commented on May 21, 2024

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.

from mu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.