Spyder: IPython console errors in macOS 10.14 (Mojave)

Created on 9 Oct 2018  路  10Comments  路  Source: spyder-ide/spyder

Issue Report Checklist

  • [x] Searched the issues page for similar reports
  • [x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • [x] Tried basic troubleshooting (if a bug/error)

    • [x] Restarted Spyder

    • [x] Reset preferences with spyder --reset

    • [x] Reinstalled the latest version of Anaconda

    • [x] Tried the other applicable steps from the Troubleshooting Guide

  • [x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Example first and described below the screenshot

test1

In [1] shows an example when pwd is understood as python variable, not the UNIX command. As the number (1) indicates, this is the very first thing I typed on the console after turning on spyder.
In [2] shows an example when the code is not ending after hitting return key for several times (more than 1 sec interval)
Also, spyder IPython console is sometimes extremely slow (e.g., declaring a variable takes few seconds).

These happen very randomly. Sometimes, I have to reopen spyder and it works fine for a while, but it gets like this again after executing few lines.

I am using OS X 10.14 (Mojave), spyder 3.3.1, Python 3.6.6, and IPython 7.0.1.
None of the above issues appear when I use IPython on terminal.
Also I hadn't experienced these problems when I used OS X 10.13, Windows 10 and Ubuntu 16.04 (until ~1-2 weeks ago). So I am guessing there is something when I use spyder on Mojave..?

What steps reproduce the problem?

Described above

What is the expected output? What do you see instead?

Described above

Paste Traceback/Error Below (if applicable)

Described above

Versions

  • Spyder version: 3.3.1
  • Python version: 3.6.6
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: OS X 10.14 Mojave

Dependencies

IPython >=4.0     :  7.0.1 (OK)
cython >=0.21     :  0.28.5 (OK)
jedi >=0.9.0      :  0.12.1 (OK)
matplotlib >=2.0.0:  3.0.0 (OK)
nbconvert >=4.0   :  5.3.1 (OK)
numpy >=1.7       :  1.15.2 (OK)
pandas >=0.13.1   :  0.23.4 (OK)
psutil >=0.3      :  5.4.7 (OK)
pycodestyle >=2.3 :  2.4.0 (OK)
pyflakes >=0.6.0  :  2.0.0 (OK)
pygments >=2.0    :  2.2.0 (OK)
pylint >=0.25     :  2.1.1 (OK)
qtconsole >=4.2.0 :  4.4.1 (OK)
rope >=0.9.4      :  0.11.0 (OK)
sphinx >=0.6.6    :  1.8.1 (OK)
sympy >=0.7.3     :  1.3 (OK)

Most helpful comment

So I am guessing there is something when I use spyder on Mojave..?

I think this is an issue with the latest IPython/ipykernel combo. Please close Spyder, open Terminal.app, run there

conda install ipykernel=4.8.2 ipython=6.5.0

and try again.

All 10 comments

So I am guessing there is something when I use spyder on Mojave..?

I think this is an issue with the latest IPython/ipykernel combo. Please close Spyder, open Terminal.app, run there

conda install ipykernel=4.8.2 ipython=6.5.0

and try again.

I had the exact same issue. Running pip install ipykernel==4.8.2 ipython==6.5.0 solved it.

@jpaasen, are you using Mojave too?

@ccordoba12
Thank you very much for the prompt proper reply.
That solved the problem completely.
It's quite unexpected that the new ipython gives this problem....
Anyway I think the problem is now gone :)
I will not close this issue at the moment as you asked and didn't get the answer yet.

I will not close this issue at the moment as you asked and didn't get the answer yet.

Ok, thanks.


@minrk, do you know what could be happening here?

@jpaasen, are you using Mojave too?

Yes. The problem started after upgrading to Mojave.

mojave and ipython 7 / ipykernel 5 were released the same week, so I'd guess it's a coincidence on the mac version, and rather a purely ipykernel issue, since there were major changes in how messages are handled. But it's technically possible it's related. Do folks see this only in spyder, or also straight qtconsole?

I've tried setting up a test environment, but haven't been able to reproduce the error yet. I, too, am on Mojave:

conda list:

# packages in environment at /Users/benjaminrk/conda/envs/spyder:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
appnope                   0.1.0                 py36_1000    conda-forge
asn1crypto                0.24.0                py36_1003    conda-forge
astroid                   2.0.3                    py36_0    conda-forge
babel                     2.6.0                      py_1    conda-forge
backcall                  0.1.0                      py_0    conda-forge
bleach                    3.0.1                      py_0    conda-forge
bzip2                     1.0.6                         1    conda-forge
ca-certificates           2018.8.24            ha4d7672_0    conda-forge
certifi                   2018.8.24             py36_1001    conda-forge
cffi                      1.11.5           py36h5e8e0c9_1    conda-forge
chardet                   3.0.4                 py36_1003    conda-forge
clangdev                  6.0.1                 default_1    conda-forge
cloudpickle               0.6.0                      py_0    conda-forge
cryptography              2.3.1            py36hdffb7b8_0    conda-forge
cryptography-vectors      2.3.1                 py36_1000    conda-forge
dbus                      1.13.2               h760590f_1  
decorator                 4.3.0                      py_0    conda-forge
docutils                  0.14                  py36_1001    conda-forge
entrypoints               0.2.3                 py36_1002    conda-forge
expat                     2.2.5                hfc679d8_2    conda-forge
gettext                   0.19.8.1             h1f1d5ed_1    conda-forge
glib                      2.56.2               h464dc38_0    conda-forge
icu                       58.2                 hfc679d8_0    conda-forge
idna                      2.7                   py36_1002    conda-forge
imagesize                 1.1.0                      py_0    conda-forge
ipykernel                 5.0.0              pyh24bf2e0_1    conda-forge
ipython                   7.0.1           py36h24bf2e0_1000    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
isort                     4.3.4                 py36_1000    conda-forge
jedi                      0.13.1                py36_1000    conda-forge
jinja2                    2.10                       py_1    conda-forge
jpeg                      9c                   h470a237_1    conda-forge
jsonschema                2.6.0                 py36_1002    conda-forge
jupyter_client            5.2.3                      py_1    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
keyring                   15.1.0                   py36_0    conda-forge
lazy-object-proxy         1.3.1            py36h470a237_0    conda-forge
libcxx                    6.0.1                         0    conda-forge
libffi                    3.2.1                hfc679d8_5    conda-forge
libiconv                  1.15                 h470a237_3    conda-forge
libpng                    1.6.35               ha92aebf_2    conda-forge
libsodium                 1.0.16               h470a237_1    conda-forge
libxml2                   2.9.8                h422b904_5    conda-forge
llvm-meta                 6.0.1                         0    conda-forge
llvmdev                   6.0.1                h2d50403_2    conda-forge
markupsafe                1.0              py36h470a237_1    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.3            py36h470a237_2    conda-forge
nbconvert                 5.3.1                      py_1    conda-forge
nbformat                  4.4.0                      py_1    conda-forge
ncurses                   6.1                  hfc679d8_1    conda-forge
numpydoc                  0.8.0                      py_1    conda-forge
openssl                   1.0.2p               h470a237_0    conda-forge
packaging                 18.0                       py_0    conda-forge
pandoc                    2.3.1                         0    conda-forge
pandocfilters             1.4.2                      py_1    conda-forge
parso                     0.3.1                      py_0    conda-forge
pcre                      8.41                 hfc679d8_3    conda-forge
pexpect                   4.6.0                 py36_1000    conda-forge
pickleshare               0.7.5                 py36_1000    conda-forge
pip                       18.1                  py36_1000    conda-forge
prompt_toolkit            2.0.5                      py_0    conda-forge
psutil                    5.4.7            py36h470a237_1    conda-forge
ptyprocess                0.6.0                 py36_1000    conda-forge
pycodestyle               2.4.0                      py_1    conda-forge
pycparser                 2.19                       py_0    conda-forge
pyflakes                  2.0.0                      py_0    conda-forge
pygments                  2.2.0                      py_1    conda-forge
pylint                    2.1.1                    py36_0    conda-forge
pyopenssl                 18.0.0                py36_1000    conda-forge
pyparsing                 2.2.2                      py_0    conda-forge
pyqt                      5.9.2            py36h655552a_2  
pysocks                   1.6.8                 py36_1002    conda-forge
python                    3.6.6                h5001a0f_0    conda-forge
python-dateutil           2.7.3                      py_0    conda-forge
python.app                1.2                    py36_200    conda-forge
pytz                      2018.5                     py_0    conda-forge
pyzmq                     17.1.2           py36hae99301_1    conda-forge
qt                        5.9.6                h45cd832_2  
qtawesome                 0.5.1              pyh8a2030e_1    conda-forge
qtconsole                 4.4.1                    py36_1    conda-forge
qtpy                      1.5.1              pyh8a2030e_0    conda-forge
readline                  7.0                  haf1bffa_1    conda-forge
requests                  2.19.1                py36_1001    conda-forge
rope                      0.10.7                     py_1    conda-forge
setuptools                40.4.3                   py36_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
sip                       4.19.8           py36hfc679d8_0    conda-forge
six                       1.11.0                py36_1001    conda-forge
snowballstemmer           1.2.1                      py_1    conda-forge
sphinx                    1.8.1                 py36_1000    conda-forge
sphinxcontrib-websupport  1.1.0                      py_1    conda-forge
spyder                    3.3.1                    py36_2    conda-forge
spyder-kernels            0.2.6                      py_1    conda-forge
sqlite                    3.25.2               hb1c47c0_0    conda-forge
testpath                  0.4.2                 py36_1000    conda-forge
tk                        8.6.8                ha92aebf_0    conda-forge
tornado                   5.1.1            py36h470a237_0    conda-forge
traitlets                 4.3.2                 py36_1000    conda-forge
typed-ast                 1.1.0                    py36_0    conda-forge
urllib3                   1.23                  py36_1001    conda-forge
wcwidth                   0.1.7                      py_1    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.32.1                   py36_0    conda-forge
wrapt                     1.10.11          py36h470a237_1    conda-forge
xz                        5.2.4                h470a237_1    conda-forge
zeromq                    4.2.5                hfc679d8_5    conda-forge
zlib                      1.2.11               h470a237_3    conda-forge

What do you get from %lsmagic?

I was having similar issues on High Sierra. Running conda install ipykernel=4.8.2 ipython=6.5.0 fixed the issues, so I'd guess @minrk is correct that the issues coinciding with the Mojave release is a coincidence.

Just to provide a bit more of info, I had a working version of Spyder under Mojave, no problems at all.. then updated to a newer version of Spyder 3.2.8. Running conda install ipykernel=4.8.2 ipython=6.5.0 seemed to help

Closing in favor of #2902, where there's more people talking about this problem.

Was this page helpful?
0 / 5 - 0 ratings