ImportError: No module named ordered_dict
See original GitHub issueHi 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:
- Created 5 years ago
- Reactions:21
- Comments:9 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Having the same kind of issue.
One of my project dependencies “google-endpoints”, depends on “Google Endpoints API Management”, which depends on
requestsandrequestsdepends onurllib3, however the installedurllib3==1.24is not supported byrequests. 🐒Enforcing the urllib3 version at the end of my
requirements.txtfile.urllib3==1.23I 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