Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPython 5 crashes kernels because of problems with Pygments #3309

Closed
samotracio opened this issue Jul 20, 2016 · 8 comments
Closed

IPython 5 crashes kernels because of problems with Pygments #3309

samotracio opened this issue Jul 20, 2016 · 8 comments

Comments

@samotracio
Copy link

samotracio commented Jul 20, 2016

Spyder does not seem to work well with ipython 5 and crashes when closing/opening consoles

What steps will reproduce the problem?

  1. Run Spyder
  2. Close the ipython console and try to open a new one (same behaviour if trying to open a second ipython console)

* What do you see ?*

An error ocurred while starting the kernel
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: module 'pkg_resources' has no attribute 'iter_entry_points'
Traceback (most recent call last):
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 183, in 
from IPython.kernel.zmq.kernelapp import IPKernelApp
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/IPython/__init__.py", line 49, in 
from .terminal.embed import embed
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/IPython/terminal/embed.py", line 17, in 
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/IPython/terminal/interactiveshell.py", line 84, in 
class TerminalInteractiveShell(InteractiveShell):
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/IPython/terminal/interactiveshell.py", line 128, in TerminalInteractiveShell
help="The name of a Pygments style to use for syntax highlighting: \n %s" % ', '.join(get_all_styles())
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/pygments/styles/__init__.py", line 76, in get_all_styles
for name, _ in find_plugin_styles():
File "/home/edonoso/anaconda3/envs/t5/lib/python3.5/site‑packages/pygments/plugin.py", line 66, in find_plugin_styles
for entrypoint in pkg_resources.iter_entry_points(STYLE_ENTRY_POINT):
AttributeError: module 'pkg_resources' has no attribute 'iter_entry_points'

Please provide any additional information below
Only solution seems to restart spyder

Versions and main components

  • Spyder Version: 2.3.9
  • Python Version: 3.5.2
  • Ipython Version: 5.0.0
  • Anaconda Version : 4.1.1 - linux - 64bit
  • Operating system: OpenSuse 13.1

Dependencies

IPython >=1.0 : 5.0.0 (OK)
jedi >=0.8.1;<0.9.0: 0.9.0 (NOK)
matplotlib >=1.0 : 1.5.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 4.3.0 (OK)
pyflakes >=0.6.0 : 1.2.3 (OK)
pygments >=1.6 : 2.1.3 (OK)
pylint >=0.25 : None (NOK)
qtconsole >=4.0 : 4.2.1 (OK)
rope >=0.9.2 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.4.1 (OK)
sympy >=0.7.3 : 1.0 (OK)
zmq >=2.1.11 : 15.2.0 (OK)

@ccordoba12 ccordoba12 added this to the v3.0beta5 milestone Jul 20, 2016
@ccordoba12 ccordoba12 changed the title Ipython 5 console crashing IPython 5 crashes kernels because of problems with Pygments Jul 20, 2016
@ccordoba12
Copy link
Member

I don't understand what this error has to do with Spyder. It seems a Pygments problem.

@ccordoba12
Copy link
Member

@Carreau, have you seen this error before?

@Carreau
Copy link

Carreau commented Jul 20, 2016

I think I've seen it, try updating setuptools. IIRC it might affect only conda, so you might need to check whether you need to shadow conda setuptools with the pip one.

For me, conda most up to date setuptools is 23.0.0-py35_0, pip can get setuptools-24.1.0.

@samotracio
Copy link
Author

Wish I could help more despite my limited knowledge. A plain ipython 5 shell runs without issue.
I can add the error appears in a fresh install of Anaconda 4.1.1 with Python 3.5. Of course, in 2.7 there are no problems.
Probably unrelated, I just found that the python console fired by Spyder also shows this error

@Carreau
Copy link

Carreau commented Jul 20, 2016

The other error is our fault, we need to release a 5.0.1 or 5.1 soon.
A release like that just take ~ a day to wrap up, and we need to be up to date on issue to be sure there is no other critical things to release.

I'll try to make that before end of week.

@ccordoba12
Copy link
Member

Thanks @Carreau! I'll leave this open until 5.0.1 or 5.1 is released.

@samotracio
Copy link
Author

Great! Thanks @Carreau and @ccordoba12
I don't dare to break setuptools yet :-)

@ccordoba12
Copy link
Member

IPython 5.1 was released some days ago, so this should be fixed now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants