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

ModuleNotFoundError: No module named 'PyQt4' #2375

Open
kurokida opened this issue Mar 25, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@kurokida
Copy link

commented Mar 25, 2019

I installed PsychoPy 3.0.6 in Mac OS 10.9.5, and I noticed a ModuleNotFoundError when I run an initial program.

The error messages are follows.

Running: /Users/jikkenyou/Desktop/USER/myName/untitled folder 2/untitled_lastrun.py
Traceback (most recent call last):
File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/gui/qtgui.py", line 15, in
from PyQt4 import QtGui
ModuleNotFoundError: No module named 'PyQt4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/jikkenyou/Desktop/USER/myName/untitled folder 2/untitled_lastrun.py", line 14, in
from psychopy import locale_setup, sound, gui, visual, core, data, event, logging, clock
File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/gui/init.py", line 33, in
from .qtgui import *
File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/gui/qtgui.py", line 19, in
from PyQt5 import QtWidgets
ImportError: dlopen(/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/PyQt5/QtWidgets.so, 2): Symbol not found: _LSCopyDefaultApplicationURLForURL
Referenced from: /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
in /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore


PsychoPy 3.0.6 is working in Mac OS 10.13.6 and 10.14.3.
Is 10.9.5 too old?
Can I use the latest PsychoPy in the old Mac?

@peircej

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

Ah. It looks like the version of PyQt we provided is too new for MacOS 10.9:
https://doc.qt.io/archives/qt-5.10/supported-platforms-and-configurations.html

In the next release I'll package PyQt 5.8 instead which should be more widely compatible.

@kurokida

This comment has been minimized.

Copy link
Author

commented Mar 26, 2019

Thanks a lot!
I am waiting for the new release one.

@grudeng2

This comment has been minimized.

Copy link

commented Mar 29, 2019

Seeing same error on Windows 10 build 1803.

@peircej

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

@grudeng2 that's stranger because the PyQt page doesn't mention any Win10 incompatibilities.
Could you go to the shell in PsychoPy's coder view and do

import PyQt5
from PyQt5 import QtWidgets
from PyQt5 import QtGui

and let me know any errors (if the first fails the other 2 are irrelevant)? Thanks

@peircej

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

This is even more confusing. I've checked on a Wind10 1803 virtual box. The gui demo runs fine and the import commands above are fine, so currently I can't reproduce the issue on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.