You're missing googletrans, just install it with pip.

Cheers,

Peter

On Sun, 17 Jan 2021, 02:12 Carsten Alexander, <aca...@web.de> wrote:

> Dear Oisín,
>
> Thank you for your detailed instructions. For a beginner like me, this is
> a valuable guide to meander along. Nevertheless, Mnemosyne breaks still off
> again. But this time with a different error message. Could it be because I
> have an outdated version of Python (3.6)?
>
> That I did:
>
>  1. ~$ pip3 --version
>     · pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
>  2. ~$ pip3 install -U pip
>       Collecting pip
>       Cache entry deserialization failed, entry ignored
>       Cache entry deserialization failed, entry ignored
>       Downloading
> https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl
> (1.5MB)
>       Installing collected packages: pip
>       Successfully installed pip-20.3.3
>  3. ~$ pip --version
>     · pip 20.3.3 from /home/acamat/.local/lib/python3.6/site-packages/pip
> (python 3.6)
>  4. ~$ pip3 --version
>       WARNING: pip is being invoked by an old script wrapper. This will
> fail in a future version of pip.
>       Please see https://github.com/pypa/pip/issues/5599 for advice on
> fixing the underlying issue.
>       To avoid this problem you can invoke Python with '-m pip' instead of
> running pip directly.
>       pip 20.3.3 from /home/acamat/.local/lib/python3.6/site-packages/pip
> (python 3.6)
>  5: ~$ pip3 install -U PyQT5
>       WARNING: pip is being invoked by an old script wrapper. This will
> fail in a future version of pip.
>       Please see https://github.com/pypa/pip/issues/5599 for advice on
> fixing the underlying issue.
>       To avoid this problem you can invoke Python with '-m pip' instead of
> running pip directly.
>       Defaulting to user installation because normal site-packages is not
> writeable
>       Collecting PyQT5
>          Downloading
> PyQt5-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-manylinux2014_x86_64.whl
> (68.3 MB)
>       Collecting PyQt5-sip<13,>=12.8
>          Downloading PyQt5_sip-12.8.1-cp36-cp36m-manylinux1_x86_64.whl
> (278 kB)
>       Installing collected packages: PyQt5-sip, PyQT5
>       Successfully installed PyQT5-5.15.2 PyQt5-sip-12.8.1
>  6: ~$ pip3 install -U PyQT5==5.14
>       WARNING: pip is being invoked by an old script wrapper. This will
> fail in a future version of pip.
>       Please see https://github.com/pypa/pip/issues/5599 for advice on
> fixing the underlying issue.
>       To avoid this problem you can invoke Python with '-m pip' instead of
> running pip directly.
>       Defaulting to user installation because normal site-packages is not
> writeable
>       Collecting PyQT5==5.14
>          Downloading
> PyQt5-5.14.0-5.14.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl (63.5 MB)
>       Requirement already satisfied: PyQt5-sip<13,>=12.7 in
> ./.local/lib/python3.6/site-packages (from PyQT5==5.14) (12.8.1)
>       Installing collected packages: PyQT5
>          Attempting uninstall: PyQT5
>             Found existing installation: PyQt5 5.15.2
>             Uninstalling PyQt5-5.15.2:
>                Successfully uninstalled PyQt5-5.15.2
>       Successfully installed PyQT5-5.14.0
>  7: ~$ mnemosyne
>       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 658, in run_script
>             self.require(requires)[0].run_script(script_name, ns)
>          File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
> line 1438, in run_script
>             exec(code, namespace, namespace)
>          File
> "/usr/local/lib/python3.6/dist-packages/Mnemosyne-2.7.3-py3.6.egg/EGG-INFO/scripts/mnemosyne",
> line 150, in <module>
>             from PyQt5 import QtWebEngineWidgets  # Needs to happen first
> for some reason.
>       ImportError: cannot import name 'QtWebEngineWidgets'
>  8: ~$ sudo apt remove python3-pyqt5.qtwebengine
>        Paket »python3-pyqt5.qtwebengine« ist nicht installiert, wird also
> auch nicht entfernt.
>  9: ~$ pip3 install PyQTWebEngine==5.14
>       WARNING: pip is being invoked by an old script wrapper. This will
> fail in a future version of pip.
>       Please see https://github.com/pypa/pip/issues/5599 for advice on
> fixing the underlying issue.
>       To avoid this problem you can invoke Python with '-m pip' instead of
> running pip directly.
>       Defaulting to user installation because normal site-packages is not
> writeable
>       Collecting PyQTWebEngine==5.14
>          Downloading
> PyQtWebEngine-5.14.0-5.14.2-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl
> (65.7 MB)
>       Requirement already satisfied: PyQt5>=5.14 in
> ./.local/lib/python3.6/site-packages (from PyQTWebEngine==5.14) (5.14.0)
>       Requirement already satisfied: PyQt5-sip<13,>=12.7 in
> ./.local/lib/python3.6/site-packages (from PyQTWebEngine==5.14) (12.8.1)
>       Installing collected packages: PyQTWebEngine
>       Successfully installed PyQTWebEngine-5.14.0
> 10: ~$ sudo python3 setup.py install
> 11: ~$ mnemosyne
>       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 658, in run_script
>             self.require(requires)[0].run_script(script_name, ns)
>          File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py",
> line 1438, in run_script
>             exec(code, namespace, namespace)
>          File
> "/usr/local/lib/python3.6/dist-packages/Mnemosyne-2.7.3-py3.6.egg/EGG-INFO/scripts/mnemosyne",
> line 279, in <module>
>             debug_file=options.debug_file)
>          File
> "/usr/local/lib/python3.6/dist-packages/Mnemosyne-2.7.3-py3.6.egg/mnemosyne/libmnemosyne/__init__.py",
> line 400, in initialise
>             self.register_components()
>          File
> "/usr/local/lib/python3.6/dist-packages/Mnemosyne-2.7.3-py3.6.egg/mnemosyne/libmnemosyne/__init__.py",
> line 465, in register_components
>             importlib.import_module(module_name), class_name)
>          File "/usr/lib/python3.6/importlib/__init__.py", line 126, in
> import_module
>             return _bootstrap._gcd_import(name[level:], package, level)
>          File "<frozen importlib._bootstrap>", line 994, in _gcd_import
>          File "<frozen importlib._bootstrap>", line 971, in _find_and_load
>          File "<frozen importlib._bootstrap>", line 955, in
> _find_and_load_unlocked
>          File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
>          File "<frozen importlib._bootstrap_external>", line 678, in
> exec_module
>          File "<frozen importlib._bootstrap>", line 219, in
> _call_with_frames_removed
>          File
> "/usr/local/lib/python3.6/dist-packages/Mnemosyne-2.7.3-py3.6.egg/mnemosyne/libmnemosyne/translators/google_translator.py",
> line 5, in <module>
>             from googletrans import Translator as gTranslator
>       ModuleNotFoundError: No module named 'googletrans'
>
> --
> Best Regards,
> Carsten Alexander
> Oisín Mac Fhearaí schrieb am Samstag, 16. Januar 2021 um 02:00:41 UTC+1:
>
>> Which version of pip are you using? I see you've been trying 3 different
>> approaches: default (presumably Python 2.7?) pip, pip3 and the APT
>> repository versions.
>>
>> You could try updating the Python 3.x version of pip using pip itself,
>> rather than the apt-installed version. This seems to work for me (on Ubuntu
>> 20.04):
>>
>> ❯ pip3 --version
>> pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
>>
>> ❯ pip3 install -U pip
>> Collecting pip
>>   Using cached pip-20.3.3-py2.py3-none-any.whl (1.5 MB)
>> Installing collected packages: pip
>> Successfully installed pip-20.3.3
>>
>> ❯ pip --version
>> pip 20.3.3 from /home/omf/.local/lib/python3.8/site-packages/pip (python
>> 3.8)
>> ❯ pip3 --version
>> pip 20.3.3 from /home/omf/.local/lib/python3.8/site-packages/pip (python
>> 3.8)
>>
>> ❯ pip3 install -U PyQT5
>> Defaulting to user installation because normal site-packages is not
>> writeable
>> Requirement already satisfied: PyQT5 in /usr/lib/python3/dist-packages
>> (5.14.1)
>> Collecting PyQT5
>>   Using cached
>> PyQt5-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-abi3-manylinux2014_x86_64.whl
>> (68.3 MB)
>> Requirement already satisfied: PyQt5-sip<13,>=12.8 in
>> /home/omf/.local/lib/python3.8/site-packages (from PyQT5) (12.8.1)
>> Installing collected packages: PyQT5
>> Successfully installed PyQT5-5.15.2
>>
>> However, Mnemosyne wouldn't launch with this version of PyQT5 since this
>> Ubuntu APT repo only has QT 5.12.
>> I got past that with this:
>>
>> ❯ pip3 install -U PyQT5==5.14
>>
>> Then it still wouldn't launch because:
>>
>> >> ImportError: cannot import name 'QtWebEngineWidgets' from 'PyQt5'
>> (/home/omf/.local/lib/python3.8/site-packages/PyQt5/__init__.py)
>>
>> It seemed I already had the required package installed via apt, and it
>> was needed for two other programs. I temporarily uninstalled them with:
>>
>> ❯ sudo apt remove python3-pyqt5.qtwebengine
>>
>> ❯ pip3 install PyQTWebEngine==5.14
>>
>> Then I reinstalled the programs that depended on
>> python3-pyqt5.qtwebengine, and Mnemosyne works again.
>>
>> Python packages can be a bit of a pain. That's why I prefer to deal with
>> them in "userspace" rather than system-wide "site-packages". But even
>> still, every few months I'll run into problems and have to reinstall
>> things. Well, it makes things exciting at least.
>>
>> Oisín
>>
>> On Fri, 15 Jan 2021 at 23:42, Carsten Alexander <aca...@web.de> wrote:
>>
>>> Peter,
>>>
>>> > If you have troubles installing Pyqt5, that's not really a Mnemosyne
>>> issue.
>>> I know that, of course. But I have a general problem with the
>>> installation of the software or its dependencies and I need help with this.
>>>
>>> I took a few steps forward:
>>>
>>>  9. ~$ sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools
>>> qt5-doc
>>> 10. ~$ sudo python3 setup.py install
>>> 11. ~$ mnemosyne
>>>     · Warning: Could not import OpenGL. Might cause a black screen on
>>> some Linux distributions. Try installing python3-opengl in that case.
>>> 12. ~$ sudo apt-get install python3-opengl
>>> 13. ~$ mnemosyne
>>>     · 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 658, in
>>> run_script
>>>             self.require(requires)[0].run_script(script_name, ns)
>>>          File
>>> "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1438, in
>>> run_script
>>>             exec(code, namespace, namespace)
>>>          File
>>> "/usr/local/lib/python3.6/dist-packages/Mnemosyne-2.7.3-py3.6.egg/EGG-INFO/scripts/mnemosyne",
>>> line 150, in <module>
>>>             from PyQt5 import QtWebEngineWidgets  # Needs to happen
>>> first for some reason.
>>>             ModuleNotFoundError: No module named 'PyQt5'
>>>
>>> I suspect the problem is still with PyQt5 and will contact the
>>> appropriate forum. In any case, thank you for your support so far.
>>>
>>> --
>>> Best Regards,
>>> Carsten Alexander
>>>
>>> Peter Bienstman schrieb am Freitag, 15. Januar 2021 um 22:09:54 UTC+1:
>>>
>>>> Hi,
>>>>
>>>> If you have troubles installing Pyqt5, that's not really a Mnemosyne
>>>> issue. Perhaps on your distro you need to install Pyqt using the system
>>>> package manager as opposed to pip? Otherwise you could also ask on a forum
>>>> devoted to your distribution?
>>>>
>>>> Peter
>>>>
>>>> On Fri, 15 Jan 2021, 21:58 Carsten Alexander, <aca...@web.de> wrote:
>>>>
>>>>> Thanks Peter,
>>>>>
>>>>> after removing Mnemosyne, I tried an installation – strictly according
>>>>> to the documentation. But she faltered while installing PyQt5.
>>>>>
>>>>> My protocol:
>>>>> 1. ~$ sudo apt-get autoremove mnemosyne
>>>>> 2. ~$ sudo apt-get install mnemosyne
>>>>>    · Traceback (innermost last):
>>>>>         File "/usr/bin/mnemosyne", line 224, in <module>
>>>>>            "ConfigurationWdgtCramming")]
>>>>>         AttributeError: 'Mnemosyne' object has no attribute
>>>>> 'extra_components_for_plugin'
>>>>> 3. ~$ sudo apt-get autoremove mnemosyne
>>>>> 4. ~$ sudo pip install --upgrade PyQt5 matplotlib cheroot webob pillow
>>>>> googletrans gTTS
>>>>>    · Could not find a version that satisfies the requirement PyQt5
>>>>> (from versions: none)
>>>>>    · No matching distribution found for PyQt5
>>>>> 5. ~$ sudo pip install --upgrade pip
>>>>> 6. ~$ sudo pip install --upgrade PyQt5 matplotlib cheroot webob pillow
>>>>> googletrans gTTS
>>>>>    · Could not find a version that satisfies the requirement PyQt5
>>>>> (from versions: none)
>>>>>    · No matching distribution found for PyQt5
>>>>> 7. ~$ sudo apt-get install python3-cherrypy3 python3-matplotlib
>>>>> python3-pip python3-setuptools python3-webob
>>>>> 8. ~$ sudo pip3 install PyQt5
>>>>>    · Traceback (most recent call last):
>>>>>         File "<string>", line 1, in <module>
>>>>>         File "/usr/lib/python3.6/tokenize.py", line 452, in open
>>>>>            buffer = _builtin_open(filename, 'rb')
>>>>>      FileNotFoundError: [Errno 2] No such file or directory:
>>>>> '/tmp/pip-build-d9q9nt3o/PyQt5/setup.py'
>>>>>      (I checked it. There is no such directory like
>>>>> „pip-build-d9q9nt3o” in /tmp.)
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Carsten Alexander
>>>>> Peter Bienstman schrieb am Freitag, 15. Januar 2021 um 06:40:42 UTC+1:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> My guess is that you have a mixture of old and new Mnemosyne files
>>>>>> somewhere. Try uninstalling both the system version and your latest
>>>>>> version, and try again.
>>>>>>
>>>>>> Peter
>>>>>>
>>>>>> On Fri, 15 Jan 2021, 06:37 Carsten Alexander, <aca...@web.de> wrote:
>>>>>>
>>>>>>> Hi folks,
>>>>>>>
>>>>>>> after I made an unsuccessful attempt to update Mnemosyne from 2.4
>>>>>>> (according to Mnemosyne » Help » About) to version 2.7.3 (according to 
>>>>>>> ~$
>>>>>>> mnemosyne --version), Mnemosyne no longer starts and breaks with the 
>>>>>>> error
>>>>>>> message
>>>>>>>
>>>>>>> Log body:
>>>>>>>   An unexpected error has occurred.
>>>>>>> Please forward the following info to the developers:
>>>>>>>
>>>>>>> Traceback (innermost last):
>>>>>>>   File "/usr/bin/mnemosyne", line 224, in <module>
>>>>>>>     "ConfigurationWdgtCramming")]
>>>>>>>  AttributeError: 'Mnemosyne' object has no attribute
>>>>>>> 'extra_components_for_plugin'
>>>>>>>
>>>>>>> from. What can I do? I can still remember the process reasonably
>>>>>>> well. So if you need additional information, please ask me . My system:
>>>>>>>
>>>>>>> Os:        Ubuntu 18.04.5 LTS
>>>>>>> Memory:    7.8 GiB
>>>>>>> Processor: Intel® Core™ i5-3570K CPU @ 3.40GHz × 4
>>>>>>> Grafix:    NV117
>>>>>>> GNOME:     3.28.2
>>>>>>> Type:      64-bit
>>>>>>>
>>>>>>> --
>>>>>>> Best regards,
>>>>>>> Carsten Alexander
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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/039dce85-2938-484f-9091-cc6ae594f1f8n%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/039dce85-2938-484f-9091-cc6ae594f1f8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>> 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/a22b9d5f-4cf8-4f2b-b902-3d8d5b130ad3n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/a22b9d5f-4cf8-4f2b-b902-3d8d5b130ad3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/c48d7e57-fbe4-4e2b-9414-3187fa399178n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/c48d7e57-fbe4-4e2b-9414-3187fa399178n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-users/9dcfe5e7-f155-402e-830b-d4b0627bfefbn%40googlegroups.com
> <https://groups.google.com/d/msgid/mnemosyne-proj-users/9dcfe5e7-f155-402e-830b-d4b0627bfefbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPG6oyN%3DVDMUs6Jjg6Ucm1ihzjm6VTSMAGWB70ON7bf-yQ%40mail.gmail.com.

Reply via email to