$ python3 -m venv leo-editor-venv
$ cd leo-editor-venv
$ bin/pip install leo
$ bin/leo
leoQt.py: can not fully import PyQt5.
Traceback (most recent call last):
File "bin/leo", line 7, in <module>
from leo.core.runLeo import run
File "[...]/leo-editor-venv/lib/python3.5/site-packages/leo/core/runLeo.py", line 27, in <module>
leoGlobals.app = leoApp.LeoApp()
File "[...]/leo-editor-venv/lib/python3.5/site-packages/leo/core/leoApp.py", line 324, in __init__
import leo.core.leoFrame as leoFrame
File "[...]/leo-editor-venv/lib/python3.5/site-packages/leo/core/leoFrame.py", line 13, in <module>
import leo.core.leoColorizer as leoColorizer
File "[...]/leo-editor-venv/lib/python3.5/site-packages/leo/core/leoColorizer.py", line 9, in <module>
from leo.core.leoQt import Qsci, QtGui, QtWidgets # isQt5, QtCore
File "[...]/leo-editor-venv/lib/python3.5/site-packages/leo/core/leoQt.py", line 76, in <module>
qt_version = QtCore.QT_VERSION_STR
NameError: name 'QtCore' is not defined
$ bin/python -m pdb bin/leo
(Pdb) break leo/core/leoQt.py:20
53 -> from PyQt5 import QtCore
ImportError: [...]/leo-editor-venv/lib/python3.5/site-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices
https://github.com/mu-editor/mu/issues/502#issuecomment-399682079
https://github.com/mu-editor/mu/issues/538#issuecomment-404096351
"Chipping in rather late: the error message in the OP refers to a Python API that was only added in 3.6.1. Since the venv is using Python 3.5 it appears that Qt have offered a wheel for 3.5 which uses code only available in 3.6"
$ bin/pip freeze | grep PyQt5==PyQt5==5.11.2
$ bin/pip install PyQt5==5.10.0
$ python3 -m venv leo-editor-venv$ cd leo-editor-venv$ bin/pip install leo$ bin/pip install PyQt5==5.10.0$ bin/leo
I tried version 5.10.1 of PyQt but got a different error; however, verson 5.10.0 seems to work.$ bin/pip install PyQt5==5.10.0
It's very nice that leo and its dependencies can now be install via pip on Linux. Clearly there are still some gotchas, but it can work!
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.
I created this issue: https://github.com/leo-editor/leo-editor/issues/944, but I didn't see a way to tag it.
[...]
0x00007fffdc77e3e1 in rl_initialize () from /usr/lib/x86_64-linux-gnu/libedit.so.2[...]
import faulthandler; faulthandler.enable()
Leo 5.7.4 devel, build 20180815095610, Wed, Aug 15, 2018 9:56:10 AMGit repo info: branch = devel, commit = 9db824eb3746Python 3.5.2, PyQt version 5.10.0linux** isPython3: TrueFatal Python error: Segmentation faultCurrent thread 0x00007fc6d6d53700 (most recent call first):File "<frozen importlib._bootstrap>", line 222 in _call_with_frames_removedFile "<frozen importlib._bootstrap_external>", line 906 in create_moduleFile "<frozen importlib._bootstrap>", line 577 in module_from_specFile "<frozen importlib._bootstrap>", line 666 in _load_unlockedFile "<frozen importlib._bootstrap>", line 958 in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 969 in _find_and_loadFile "/usr/lib/python3.5/rlcompleter.py", line 174 in <module>File "<frozen importlib._bootstrap>", line 222 in _call_with_frames_removedFile "<frozen importlib._bootstrap_external>", line 665 in exec_moduleFile "<frozen importlib._bootstrap>", line 673 in _load_unlockedFile "<frozen importlib._bootstrap>", line 958 in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 969 in _find_and_loadFile "[...]/leo-editor/leo/plugins/python_terminal.py", line 52 in <module>File "<frozen importlib._bootstrap>", line 222 in _call_with_frames_removedFile "<frozen importlib._bootstrap_external>", line 665 in exec_moduleFile "<frozen importlib._bootstrap>", line 673 in _load_unlockedFile "<frozen importlib._bootstrap>", line 958 in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 969 in _find_and_loadFile "[...]/leo-editor/leo/core/leoPlugins.py", line 516 in loadOnePluginHelperFile "[...]/leo-editor/leo/core/leoPlugins.py", line 563 in loadOnePluginFile "[...]/leo-editor/leo/core/leoPlugins.py", line 457 in loadHandlersFile "[...]/leo-editor/leo/core/leoPlugins.py", line 338 in doPluginsFile "[...]/leo-editor/leo/core/leoGlobals.py", line 5016 in doHookFile "[...]/leo-editor/leo/core/leoApp.py", line 2219 in loadFile "[...]/leo-editor/leo/core/runLeo.py", line 72 in runFile "[...]/leo-editor/launchLeo.py", line 9 in <module>Segmentation fault (core dumped)
Leo 5.7.4 devel, build 20180807122609, Tue Aug 7 12:26:09 CDT 2018Git repo info: branch = devel, commit = 532eda4fd138Python 3.5.2, PyQt version 5.10.0linux** isPython3: Truereading settings in /leo/leo/test/unitTest.leofound 2 doctests for leo.core.leoGlobalsfound 1 doctests for leo.core.leoTestFatal Python error: Segmentation faultCurrent thread 0x00007f74a2411700 (most recent call first):File "<frozen importlib._bootstrap>", line 222 in _call_with_frames_removedFile "<frozen importlib._bootstrap_external>", line 906 in create_moduleFile "<frozen importlib._bootstrap>", line 577 in module_from_specFile "<frozen importlib._bootstrap>", line 666 in _load_unlockedFile "<frozen importlib._bootstrap>", line 958 in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 969 in _find_and_loadFile "/usr/lib/python3.5/pdb.py", line 151 in __init__File "/usr/lib/python3.5/doctest.py", line 357 in __init__File "/usr/lib/python3.5/doctest.py", line 1453 in runFile "/usr/lib/python3.5/doctest.py", line 2185 in runTestFile "/usr/lib/python3.5/unittest/case.py", line 600 in runFile "/usr/lib/python3.5/unittest/case.py", line 648 in __call__File "/usr/lib/python3.5/unittest/suite.py", line 122 in runFile "/usr/lib/python3.5/unittest/suite.py", line 84 in __call__File "/usr/lib/python3.5/unittest/suite.py", line 122 in runFile "/usr/lib/python3.5/unittest/suite.py", line 84 in __call__File "/usr/lib/python3.5/unittest/suite.py", line 122 in runFile "/usr/lib/python3.5/unittest/suite.py", line 84 in __call__File "/usr/lib/python3.5/unittest/runner.py", line 176 in runFile "/leo/leo/core/leoTest.py", line 659 in doTestsFile "/leo/leo/commands/debugCommands.py", line 185 in runSelectedUnitTestsLocallyFile "/leo/leo/core/leoGlobals.py", line 320 in new_cmd_wrapperFile "/leo/leo/core/leoCommands.py", line 2071 in executeAnyCommandFile "/leo/leo/core/leoCommands.py", line 2042 in doCommandFile "/leo/leo/core/leoKeys.py", line 3677 in masterCommandFile "/leo/leo/core/leoKeys.py", line 3115 in doBindingFile "/leo/leo/core/leoKeys.py", line 3068 in masterKeyHandlerFile "/leo/leo/plugins/qt_events.py", line 90 in eventFilterFile "/leo/leo/plugins/qt_gui.py", line 1130 in runMainLoopFile "/leo/leo/core/leoApp.py", line 2235 in loadFile "/leo/leo/core/runLeo.py", line 72 in runFile "/leo/launchLeo.py", line 9 in <module>Segmentation fault (core dumped)