question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named ordered_dict

See original GitHub issue

Hi urllib3 team!

I was testing a release of my code on Python 2.7 and I got the following error with urllib3==1.24. It worked on 1.23. I saw that Python 2.6 is EOL, but I figure that means you’re still supporting 2.7 for now. Here’s my stack trace:

ImportError while importing test module '/usr/people/ws9/cloud-volume/test/test_chunks.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../.virtualenvs/cv2/local/lib/python2.7/site-packages/six.py:709: in exec_
    exec("""exec _code_ in _globs_, _locs_""")
test/test_chunks.py:7: in <module>
    from cloudvolume.chunks import encode, decode
cloudvolume/__init__.py:1: in <module>
    from .connectionpools import ConnectionPool
cloudvolume/connectionpools.py:6: in <module>
    from google.cloud.storage import Client
../.virtualenvs/cv2/local/lib/python2.7/site-packages/google/cloud/storage/__init__.py:37: in <module>
    from google.cloud.storage.batch import Batch
../.virtualenvs/cv2/local/lib/python2.7/site-packages/google/cloud/storage/batch.py:26: in <module>
    import requests
../.virtualenvs/cv2/local/lib/python2.7/site-packages/requests/__init__.py:112: in <module>
    from . import utils
../.virtualenvs/cv2/local/lib/python2.7/site-packages/requests/utils.py:26: in <module>
    from ._internal_utils import to_native_string
../.virtualenvs/cv2/local/lib/python2.7/site-packages/requests/_internal_utils.py:11: in <module>
    from .compat import is_py2, builtin_str, str
../.virtualenvs/cv2/local/lib/python2.7/site-packages/requests/compat.py:48: in <module>
    from urllib3.packages.ordered_dict import OrderedDict
E   ImportError: No module named ordered_dict

Thanks! I’m working around this by using 1.23 for now so no big deal on my end.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:21
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

36reactions
salvador-byndcommented, Oct 16, 2018

Having the same kind of issue.

One of my project dependencies “google-endpoints”, depends on “Google Endpoints API Management”, which depends on requests and requests depends on urllib3, however the installed urllib3==1.24 is not supported by requests. 🐒

Enforcing the urllib3 version at the end of my requirements.txt file. urllib3==1.23

35reactions
Madpentistecommented, Nov 13, 2018

I had the same issue, that prevented the menu item “Printers” (System>Administration>Printers) to launch. In a terminal, the command $ printer-config-system would throw an error similar as above.

The problem was completely solved by issuing in a terminal $ sudo pip install -U requests

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 2.7.5 getting import OrderedDict ImportError
OrderedDict belongs to the collections module. It is not standalone. You need to from collections import OrderedDict .
Read more >
ImportError: No module named ordered_dict - YunoHost Forum
Whenever i tried to install pip3 in yunhost server, it keep giving me this error.i require this package for aws cli and its...
Read more >
805020 - [traceback] ImportError: No module named ordereddict
I'm getting a lot of emails from input-dev with tracebacks like this one all of which end the same. Pretty sure this started...
Read more >
pip error "No module named ordered_dict" - Super User
I seem to have blundered into an answer: add python-pip-whl. FROM debian:jessie RUN sed -i '/jessie-updates/d' /etc/apt/sources.list # Now ...
Read more >
Ordereddict pip install, No module named ordered_dict ...
try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict # Now use it from any version of Python mydict = OrderedDict() ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found