Installation on MacOS (10.10)

57 views
Skip to first unread message

matelot

unread,
Aug 5, 2018, 5:56:22 PM8/5/18
to leo-e...@googlegroups.com

hi how exactly should one install on MacOS ?

I followed the guide on the conda section
but has error when running leo:


should I follow this part instead ?

leoQt.py: can not fully import PyQt5.
Traceback (most recent call last):
 
File "/Users/matelot/miniconda/envs/py3/bin/leo", line 7, in <module>
   
from leo.core.runLeo import run
 
File "/Users/matelot/miniconda/envs/py3/lib/python3.6/site-packages/leo/core/runLeo.py", line 27, in <module>
    leoGlobals
.app = leoApp.LeoApp()
 
File "/Users/matelot/miniconda/envs/py3/lib/python3.6/site-packages/leo/core/leoApp.py", line 324, in __init__
   
import leo.core.leoFrame as leoFrame
 
File "/Users/matelot/miniconda/envs/py3/lib/python3.6/site-packages/leo/core/leoFrame.py", line 13, in <module>
   
import leo.core.leoColorizer as leoColorizer
 
File "/Users/matelot/miniconda/envs/py3/lib/python3.6/site-packages/leo/core/leoColorizer.py", line 9, in <module>
   
from leo.core.leoQt import Qsci, QtGui, QtWidgets # isQt5, QtCore
 
File "/Users/matelot/miniconda/envs/py3/lib/python3.6/site-packages/leo/core/leoQt.py", line 76, in <module>
    qt_version
= QtCore.QT_VERSION_STR
NameError: name 'QtCore' is not defined

| $ conda list
# packages in environment at /Users/matelot/miniconda/envs/py3:
#
# Name                    Version                   Build  Channel
alabaster                
0.7.11                    <pip>
appdirs                  
1.4.3            py36h28b3542_0
appnope                  
0.1.0            py36hf537a9a_0
asn1crypto                
0.24.0                   py36_0
astroid                  
2.0.2                     <pip>
attrs                    
18.1.0                   py36_0
automat                  
0.7.0                    py36_0
Babel                     2.6.0                     <pip>
backcall                  
0.1.0                    py36_0
backports_abc            
0.5                      py36_0
bleach                    
2.1.3                    py36_0
ca
-certificates           2018.03.07                    0    anaconda
certifi                  
2018.4.16                py36_0    anaconda
cffi                      
1.11.5           py36h342bebf_0
chardet                  
3.0.4                    py36_1
constantly                
15.1.0           py36h28b3542_0
cryptography              
2.2.2            py36h1de35cc_0
dbus                      
1.13.2               h760590f_1    anaconda
decorator                
4.3.0                    py36_0
docutils                  
0.14                      <pip>
entrypoints              
0.2.3                    py36_2
expat                    
2.2.5                hb8e80ba_0    anaconda
gettext                  
0.19.8.1             h15daf44_3    anaconda
glib                      
2.56.1               h35bc53a_0    anaconda
html5lib                  
1.0.1                    py36_0
hyperlink                
18.0.0                   py36_0
icu                      
58.2                 h4b95b61_1    anaconda
idna                      
2.7                      py36_0
imagesize                
1.0.0                     <pip>
incremental              
17.5.0                   py36_0
intel
-openmp              2018.0.0             h8158457_8
ipykernel                
4.8.2                    py36_0
ipython                  
6.5.0                    py36_0
ipython_genutils          
0.2.0            py36h241746c_0
ipywidgets                
7.3.1                    py36_0
isort                    
4.3.4                     <pip>
jedi                      
0.12.1                   py36_0
jinja2                    
2.10                     py36_0
jpeg                      
9b                   he5867d9_2    anaconda
jsonschema                
2.6.0            py36hb385e00_0
jupyter                  
1.0.0                    py36_4
jupyter_client            
5.2.3                    py36_0
jupyter_console          
5.2.0                    py36_1
jupyter_core              
4.4.0                    py36_0
keyring                  
13.2.1                    <pip>
lazy
-object-proxy         1.3.1                     <pip>
leo                      
5.7.3                     <pip>
libcxx                    
4.0.1                h579ed51_0
libcxxabi                
4.0.1                hebd6815_0
libedit                  
3.1.20170329         hb402a30_2
libffi                    
3.2.1                h475c297_4
libiconv                  
1.15                 hdd342a3_7    anaconda
libpng                    
1.6.34               he12f830_0    anaconda
libprotobuf              
3.5.2                h2cd40f5_0
libsodium                
1.0.16               h3efe00b_0
markupsafe                
1.0              py36h1de35cc_1
mccabe                    
0.6.1                     <pip>
mistune                  
0.8.3            py36h1de35cc_1
mkl                      
2017.0.4             h1fae6ae_0
mock                      
2.0.0            py36hd48142b_0
nbconvert                
5.3.1                    py36_0
nbformat                  
4.4.0            py36h827af21_0
ncurses                  
6.1                  h0a44026_0
notebook                  
5.6.0                    py36_0
numpy                    
1.12.1                   py36_0
openssl                  
1.0.2o               h1de35cc_1    anaconda
packaging                
17.1                      <pip>
pandas                    
0.23.3           py36h6440ff4_0
pandoc                    
2.2.1                h1a437c5_0
pandocfilters            
1.4.2                    py36_1
parso                    
0.3.1                    py36_0
path
.py                   11.0.1                   py36_0
pbr                      
4.2.0                    py36_0
pcre                      
8.42                 h378b8a2_0    anaconda
pexpect                  
4.6.0                    py36_0
pickleshare              
0.7.4            py36hf512f8e_0
pip                      
18.0                      <pip>
pip                      
10.0.1                   py36_0
pkginfo                  
1.4.2                     <pip>
prometheus_client        
0.3.1                    py36_0
prompt_toolkit            
1.0.15           py36haeda067_0
protobuf                  
3.5.2            py36h0a44026_1
ptyprocess                
0.6.0                    py36_0
pyasn1                    
0.4.4                    py36_0
pyasn1
-modules            0.2.2                    py36_0
pycparser                
2.18                     py36_1
pyflakes                  
2.0.0                     <pip>
pygments                  
2.2.0            py36h240cd3f_0
pylint                    
2.1.0                     <pip>
pyopenssl                
18.0.0                   py36_0
pypandoc                  
1.4                       <pip>
pyparsing                
2.2.0                     <pip>
pyqt                      
5.9.2            py36h655552a_0    anaconda
PyQt5                     5.11.2                    <pip>
PyQt5_sip                 4.19.12                   <pip>
pysocks                  
1.6.8                    py36_0
python                    
3.6.6                hc167b69_0
python
-dateutil           2.7.3                    py36_0
pytz                      
2018.5                   py36_0
pyzmq                    
17.0.0           py36h1de35cc_3
qt                        
5.9.6                h74ce4d9_0    anaconda
qtconsole                
4.3.1            py36hd96c0ff_0
readline                  
7.0                  hc1231fa_4
requests                  
2.19.1                   py36_0
requests
-toolbelt         0.8.0                     <pip>
scikit
-learn              0.19.0              np112py36_0
scipy                    
0.19.1              np112py36_0
semantic
-version          2.6.0                     <pip>
send2trash                
1.5.0                    py36_0
service_identity          
17.0.0           py36h28b3542_0
setuptools                
39.2.0                   py36_0
simplegeneric            
0.8.1                    py36_2
sip                      
4.19.8           py36h0a44026_0    anaconda
six                      
1.11.0                   py36_1
snowballstemmer          
1.2.1                     <pip>
Sphinx                    1.7.6                     <pip>
sphinxcontrib
-websupport  1.1.0                     <pip>
sqlite                    
3.24.0               ha441bb4_0
tensorflow                
1.1.0               np112py36_0
terminado                
0.8.1                    py36_1
testpath                  
0.3.1            py36h625a49b_0
tk                        
8.6.7                h35a86e2_3
tornado                  
5.0.2            py36h1de35cc_0
tqdm                      
4.24.0                    <pip>
traitlets                
4.3.2            py36h65bd3ce_0
twine                    
1.11.0                    <pip>
twisted                  
17.5.0                   py36_0    anaconda
typed
-ast                 1.1.0                     <pip>
typing                    
3.6.4                     <pip>
urllib3                  
1.23                     py36_0
wcwidth                  
0.1.7            py36h8c6ec74_0
webencodings              
0.5.1                    py36_1
werkzeug                  
0.14.1                   py36_0
wheel                    
0.31.1                   py36_0
widgetsnbextension        
3.3.1                    py36_0
wrapt                    
1.10.11                   <pip>
xz                        
5.2.4                h1de35cc_4
zeromq                    
4.2.5                h0a44026_0
zlib                      
1.2.11               hf3cbc9b_2
zope                      
1.0                      py36_0
zope
.interface            4.5.0            py36h1de35cc_0


Brian Theado

unread,
Aug 5, 2018, 8:00:11 PM8/5/18
to leo-editor
matelot,

Can you try to run python and manually run some import statements? The leo code currently suppresses the details of PyQt import errors. Hopefully manually running the imports will give those suppressed details.

Here's what I mean (using the setup from https://groups.google.com/forum/#!topic/leo-editor/ghiIN7irzY0 which gives the same error message you are seeing but almost surely for a different reason):
$ python
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtCore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: [...]/lib/python3.5/site-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices

If you get an error from the above import (likely different from the error above), then it might help give a clue. If you don't get an error from that one, then also try all of the following:

        from PyQt5 import QtGui
        from PyQt5 import QtWidgets
        from PyQt5.QtCore import QUrl

Brian

On Sun, Aug 5, 2018 at 5:56 PM matelot <webto...@gmail.com> wrote:

hi how exactly should one install on MacOS ?

I followed the guide on the conda section.

--
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.

matelot

unread,
Aug 6, 2018, 10:16:58 PM8/6/18
to leo-editor
nobody runs Leo on Mac, really ?

Terry Brown

unread,
Aug 6, 2018, 10:44:54 PM8/6/18
to leo-e...@googlegroups.com
On Mon, 6 Aug 2018 19:16:58 -0700 (PDT)
matelot <webto...@gmail.com> wrote:

> nobody runs Leo on Mac, really ?

People do, I think Brian's one of them.

Brian's suggestion was the first step to answering the question. You
appear to have PyQt installed, but it fails to import. So entering

python

and then

from PyQt5 import QtCore

in the same command line environment you're running Leo in would be
very informative.

For example just now I got:

leo-editor:0> python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtCore
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyQt5

because I only have PyQt5 installed for python3

I notice you list:

pyqt 5.9.2 py36h655552a_0 anaconda
PyQt5 5.11.2 <pip>

which makes it seem like there might be two versions installed, not
necessarily an issues, but again, `from PyQt5 import QtCore` would be
really interesting.

An aside, when did GCC hit version 7? Yikes :-}

Cheers -Terry

matelot

unread,
Aug 6, 2018, 11:50:20 PM8/6/18
to leo-editor
thanks for the replies folks. Leo is running now:

Leo 5.7.3, build 20180525162844, Fri May 25 16:28:44 CDT 2018
Not running from a git repo
Python 3.6.6, PyQt version 5.9.6
darwin
** isPython3: True
** caching enabled



I simply did an "update-all" and these are the output relevant to Leo & its dependencies:
I don't see nothing new from the paste in my original paste. Strange.  
Maybe the error was due to maybe my starting leo in the same cmd session right after installing all the stuff.... 

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    qt-5.9.6                   |       h74ce4d9_0        78.6 MB
    sip-4.19.8                 |   py36h0a44026_0         252 KB
    pyqt-5.9.2                 |   py36h655552a_0         4.7 MB
    ------------------------------------------------------------

The following packages will be UPDATED:

    pyqt:            5.9.2-py36h655552a_0  anaconda --> 5.9.2-py36h655552a_0
    qt:              5.9.6-h74ce4d9_0      anaconda --> 5.9.6-h74ce4d9_0
    scikit-learn:    0.19.0-np112py36_0             --> 0.19.1-py36hffbff8c_0
    scipy:           0.19.1-np112py36_0             --> 1.1.0-py36hcaad992_0
    sip:             4.19.8-py36h0a44026_0 anaconda --> 4.19.8-py36h0a44026_0
    twisted:         17.5.0-py36_0         anaconda --> 17.5.0-py36_0

Proceed ([y]/n)? y


 
Thanks for your help 

Edward K. Ream

unread,
Aug 7, 2018, 6:05:58 AM8/7/18
to leo-editor
On Mon, Aug 6, 2018 at 10:50 PM, matelot <webto...@gmail.com> wrote:
thanks for the replies folks. Leo is running now:

Excellent.  And thanks to you for not giving up.

Edward
Reply all
Reply to author
Forward
0 new messages