Issue launching mnemosyne on Linux Mint.

120 views
Skip to first unread message

ejovo

unread,
Jan 31, 2021, 11:05:59 AM1/31/21
to mnemosyne-proj-users
Hey guys, I recently switched to linux and wanted to get mnemosyne up and running on my new machine. However, when I try to run mnemosyne, I'm running into an error with PyQt. I've already installed the dependencies that are specified in the readme file, and I've tried exporting my LD_LIBRARY_PATH where the PyQt module gets installed. Still haven't had any luck. I unfortunately don't have a lot of experience with Python so I don't know how to hack a solution, but here is the error messages that I get:

Log body:
 An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/local/bin/mnemosyne", line 4, in <module>
    __import__('pkg_resources').run_script('Mnemosyne==2.7.3', 'mnemosyne')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.8/dist-packages/Mnemosyne-2.7.3-py3.8.egg/EGG-INFO/scripts/mnemosyne", line 150, in <module>
    from PyQt5 import QtWebEngineWidgets  # Needs to happen first for some reason.
 ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/ejovo13/.local/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so)

An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/local/bin/mnemosyne", line 4, in <module>
    __import__('pkg_resources').run_script('Mnemosyne==2.7.3', 'mnemosyne')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.8/dist-packages/Mnemosyne-2.7.3-py3.8.egg/EGG-INFO/scripts/mnemosyne", line 150, in <module>
    from PyQt5 import QtWebEngineWidgets  # Needs to happen first for some reason.
 ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/ejovo13/.local/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so)
An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
  File "/usr/local/bin/mnemosyne", line 4, in <module>
    __import__('pkg_resources').run_script('Mnemosyne==2.7.3', 'mnemosyne')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.8/dist-packages/Mnemosyne-2.7.3-py3.8.egg/EGG-INFO/scripts/mnemosyne", line 150, in <module>
    from PyQt5 import QtWebEngineWidgets  # Needs to happen first for some reason.
 ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/ejovo13/.local/lib/python3.8/site-packages/PyQt5/QtCore.abi3.so)

If any Linux power users who are experienced with Python could suggest some possible approaches, I'd be more than happy.

Cheers,
ejovo

Peter Bienstman

unread,
Jan 31, 2021, 11:08:21 AM1/31/21
to mnemosyne-...@googlegroups.com
Hi,

Alternatively you could also try asking on a Linux Mint forum on how to install Pyqt if the standard 'pip install PyQt5' does not work. 

Cheers, 

Peter 


--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/0bcf3772-7b7b-4d95-a049-0c7e91bbea13n%40googlegroups.com.

ejovo

unread,
Jan 31, 2021, 11:56:46 AM1/31/21
to mnemosyne-proj-users
Hi, 

I isolated just one single import to get to the bottom of this issue. I opened my own test.py file to see whats going on. I am able to successfully install PyQt5, and import it into my test.py file. However, when I inspect the contents of the PyQt5 package (module? I don't have the right language yet) I notice that the QtWebEngineWidgets module isn't listed. It appears that it has now been moved to a separate package, aptly named PyQtWebEngine. So, I installed the PyQtWebEngine module without issue, and verified that it now appears as a part of the PyQt5 package.

This is the weird part, I can import certain modules from PyQt5 without error, for example Qt. However, if I try to import other modules (which are clearly present in the package PyQt5), like QtCore or QtWebEngineWidgets.

I'll ask around on the Linux Mint forums, but could you take 30 seconds just to check out these screenshots? Any ideas why the importing would be successful for certain modules, and then lead to an error for others? All within the same package!

Anyways, I appreciate your time and I'm super bummed that I can't get this up and running because I love Mnemosyne so much!!!

Cheers, 
ejovo
test.py.png
test.py_error.png
PyQt5_contents.png

Bithov Vinu Student

unread,
Jan 31, 2021, 11:56:49 AM1/31/21
to mnemosyne-...@googlegroups.com
I find that error only comes up when installing from source. Remove Mnemosyne using dpkg and install it using apt-get.


Student Account
Calday Grange Grammar School is a charitable company limited by guarantee and registered in England and Wales with company number 8332696.
The Registered Office is at Grammar School Lane, West Kirby, Wirral, CH48 8GG

ejovo

unread,
Jan 31, 2021, 12:08:28 PM1/31/21
to mnemosyne-proj-users
I'll try a fresh build using apt-get, but it's important to note that this is an issue with python imports, not mnemosyne itself. In fact, I was able to fix the import issue by rolling back the version of PyQt5 and PyQtWebEngine to an arbitrary earlier build. 

I'm now able to launch Mnemosyne (and don't hate me but I downloaded Anki as a second option, which was also failing thanks to the errors while importing - but it's now working), so I actually don't need reinstall anything. If anyone runs into this issue in the future, here are the versions of PyQt5 and QtWebEngine that are working:

PyQt5                    5.12
PyQt5-sip                12.8.1
PyQtWebEngine            5.12

I'm sorry if this was the wrong forum to post to, I didn't know in the beginning that it was an issue with Qt, and not Mnemosyne. However, I'm now able to get my cards back up and running again, so cheers!!!! Feel free to close the forum as my issue has been resolved.

Ejovo



MTSowbug

unread,
Feb 23, 2021, 9:01:54 AM2/23/21
to mnemosyne-proj-users
I was experiencing the same issue as Ejovo upon upgrading Ubuntu from 18.04 to 20.04 - a PyQt5 ImportError prevented Mnemosyne from launching. The only thing was worked was downgrading PyQtt, PyQt5-sip, and PyQtWebEngine as Ejovo described. I am extremely grateful for this thread! After many hours of unsuccessful troubleshooting, I was growing worried that I would have to abandon Mnemosyne.

Peter Bienstman

unread,
Feb 23, 2021, 9:02:34 AM2/23/21
to mnemosyne-...@googlegroups.com
Thanks for sharing!

Peter

Reply all
Reply to author
Forward
0 new messages