spyder on redhat 6.4 - ImportError: cannot import name OrderedDict

1,442 views
Skip to first unread message

yzd

unread,
Jan 19, 2016, 2:16:30 PM1/19/16
to spyder
Hello,
I installed 2.3.8 spyder on Redhat 6.4
At launch, I have the following error:

File "/usr/bin/spyder", line 3, in <module>
    start_app.main()
  File "/usr/lib/python2.6/site-packages/spyderlib/start_app.py", line 114, in main
    from spyderlib import spyder
  File "/usr/lib/python2.6/site-packages/spyderlib/spyder.py", line 142, in <module>
    from spyderlib.utils.introspection import module_completion
  File "/usr/lib/python2.6/site-packages/spyderlib/utils/introspection/__init__.py", line 11, in <module>
    from .plugin_manager import PluginManager
  File "/usr/lib/python2.6/site-packages/spyderlib/utils/introspection/plugin_manager.py", line 11, in <module>
    from collections import OrderedDict
ImportError: cannot import name OrderedDict



Do you have an idea?

Carlos Córdoba

unread,
Jan 19, 2016, 2:28:02 PM1/19/16
to spyd...@googlegroups.com
Hi,

That was a mistake in our side because OrderedDict was introduced in Python 2.7. You can fix that problem by running

    pip install ordereddict

or

    easy_install
ordereddict

in case the first command doesn't work.


Cheers,
Carlos

El 19/01/16 a las 05:22, yzd 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.
Visit this group at https://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

yzd

unread,
Jan 20, 2016, 11:46:01 AM1/20/16
to spyder
Hello,

I solved the issue.

/usr/lib64/python2.6/collections.py
in this file, there was no definition of 'OrderedDict'

I had this:
__all__ = ['deque', 'defaultdict', 'namedtuple']
...

I added the 'OrderedDict' with its definition
__all__ = ['deque', 'defaultdict', 'namedtuple', 'OrderedDict']

Reply all
Reply to author
Forward
0 new messages