pygments dependency injection

218 views
Skip to first unread message

anatoly techtonik

unread,
Oct 15, 2012, 10:29:08 AM10/15/12
to spyd...@googlegroups.com
Hi guys,

I've noticed that Spyder now doesn't run without pygments. Is that intentional? Can we make the dependency optional?

http://code.google.com/p/spyderlib/source/browse/README

Pierre Raybaut

unread,
Nov 4, 2012, 3:59:09 PM11/4/12
to spyd...@googlegroups.com
Done:
http://code.google.com/p/spyderlib/source/detail?r=081c53e653732a51a2c924f3a24ae90f6742686f

Cheers,
-Pierre

2012/10/15 anatoly techtonik <tech...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/Sq6CQ2t7MPgJ.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

Mark Mikofski

unread,
Mar 18, 2015, 7:53:40 PM3/18/15
to spyd...@googlegroups.com
Spyder 2.3.3
IPython 3

without pygments, spyder causes python to crash on windows,
hard for user to know what the issue is since there is no feedback,
and crash windows have strong negative association.
Spyder dialog says to use `spyder --reset`,
but that doesn't work since it's not the issue

please either
* make pygments required during installation
or
* handle ImportError gracefully
  - fall back to python interpreter console
  - issue message

Thanks!

Carlos Córdoba

unread,
Mar 18, 2015, 8:08:52 PM3/18/15
to spyd...@googlegroups.com
Hi,

How did you install Spyder? What is the error that you're seeing?

The error would be helpful to provide a better handling mechanism for Pygments.

Cheers,
Carlos

El 18/03/15 a las 18:53, Mark Mikofski escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.

To post to this group, send email to spyd...@googlegroups.com.

Michael Beyer

unread,
Aug 12, 2015, 4:46:10 PM8/12/15
to spyder
Carlos:

I am getting this error too. Here's the details:

Running Python 2.7.10 - 32-bit on Windows 7 Professional

I manually installed spyder by first installing the dependencies, as per the install webpage. No issues with installing those.

I then installed Spyder and clicked on the icon. It crashed as shown in the previous poster's description. Here's the error from the crash log:

Traceback (most recent call last):
 
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 2336, in main
    mainwindow
= run_spyder(app, options, args)
 
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 2220, in run_spyder
    main
.setup()
 
File "C:\Python27\lib\site-packages\spyderlib\spyder.py", line 766, in setup
   
from spyderlib.plugins.inspector import ObjectInspector
 
File "C:\Python27\lib\site-packages\spyderlib\plugins\inspector.py", line 41, in <module>
   
from spyderlib.widgets.ipython import IPythonControlWidget
 
File "C:\Python27\lib\site-packages\spyderlib\widgets\ipython.py", line 28, in <module>
    pygments_patch
.apply()
 
File "C:\Python27\lib\site-packages\spyderlib\pygments_patch.py", line 27, in apply
   
from IPython.frontend.qt.console.pygments_highlighter import RegexLexer
ImportError: No module named pygments_highlighter


I have successfully loaded Spyder before, but now that I'm using 32-bit, it seems to be an issue.

Adrian Klaver

unread,
Aug 12, 2015, 4:51:23 PM8/12/15
to spyd...@googlegroups.com
On 08/12/2015 12:43 PM, Michael Beyer wrote:
> Carlos:
>
> I am getting this error too. Here's the details:
>
> Running Python 2.7.10 - 32-bit on Windows 7 Professional
>
> I manually installed spyder by first installing the dependencies, as per
> the install webpage. No issues with installing those.
>
> I then installed Spyder and clicked on the icon. It crashed as shown in
> the previous poster's description. Here's the error from the crash log:
>
> |
> Traceback(most recent call last):
> File"C:\Python27\lib\site-packages\spyderlib\spyder.py",line 2336,inmain
> mainwindow =run_spyder(app,options,args)
> File"C:\Python27\lib\site-packages\spyderlib\spyder.py",line
> 2220,inrun_spyder
> main.setup()
> File"C:\Python27\lib\site-packages\spyderlib\spyder.py",line 766,insetup
> fromspyderlib.plugins.inspector importObjectInspector
> File"C:\Python27\lib\site-packages\spyderlib\plugins\inspector.py",line
> 41,in<module>
> fromspyderlib.widgets.ipython importIPythonControlWidget
> File"C:\Python27\lib\site-packages\spyderlib\widgets\ipython.py",line
> 28,in<module>
> pygments_patch.apply()
> File"C:\Python27\lib\site-packages\spyderlib\pygments_patch.py",line
> 27,inapply
> fromIPython.frontend.qt.console.pygments_highlighter importRegexLexer
> ImportError:Nomodulenamed pygments_highlighter

Since this seems to be an IPython problem, what version of IPython are
you running?

FYI, IPython is in constant large scale flux at the moment so it is not
surprising that there are issues. It has gotten to the point I am
seriously looking at other options. Seems money is 'the root of all evils':)
>> send an email to spyderlib+...@googlegroups.com <javascript:>.
>> To post to this group, send email to spyd...@googlegroups.com
>> <javascript:>.
>> <http://groups.google.com/group/spyderlib>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to spyderlib+...@googlegroups.com
> <mailto:spyderlib+...@googlegroups.com>.
> To post to this group, send email to spyd...@googlegroups.com
> <mailto:spyd...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/spyderlib.
> For more options, visit https://groups.google.com/d/optout.


--
Adrian Klaver
adrian...@aklaver.com

Carlos Córdoba

unread,
Aug 12, 2015, 6:46:57 PM8/12/15
to spyd...@googlegroups.com
Hi,

If you installed Spyder *this morning*, you need to run

    pip install qtconsole

to install the Jupyter (previously IPython) component that Spyder depends on

Just running

    pip install ipython

installs now the terminal (i.e. cmd.exe) version of IPython.


You can read more about what happened to the IPython project (and the transition to Jupyter) here:

http://blog.jupyter.org/2015/04/15/the-big-split/


Cheers,
Carlos

El 12/08/15 a las 14:43, Michael Beyer escribió:

Michael Beyer

unread,
Aug 13, 2015, 10:47:00 AM8/13/15
to spyder
Thanks Carlos. I ended up just using the Anaconda distribution - it also had problems starting up, but it puts a nice little icon  "Reset Spyder" in the start menu...did the trick!

The whole IPython vs Jupyter ect is very confusing...thanks for the link!

Adrian Klaver

unread,
Aug 13, 2015, 10:56:32 AM8/13/15
to spyd...@googlegroups.com
On 08/13/2015 05:22 AM, Michael Beyer wrote:
> Thanks Carlos. I ended up just using the Anaconda distribution - it also
> had problems starting up, but it puts a nice little icon "Reset Spyder"
> in the start menu...did the trick!
>
> The whole IPython vs Jupyter ect is very confusing...thanks for the link!
>

Agreed. The link was interesting, but the information in it was clear as
mud. Basically, as I see it, the project blew up the IPython namespace
without a clear way forward. Personally I think if you use IPython for
Python, nothing should change and you should not have to care about
Jupyter.


--
Adrian Klaver
adrian...@aklaver.com
Reply all
Reply to author
Forward
0 new messages