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.

Python 3 issue with urllib3 (local) import

See original GitHub issue

The problem with broken import occurs when Python 3.3.0 (virtualenv, Ubuntu 12.04 LTS).

In Python 2.7.4 (virtualenv, same machine) everything runs smoothly.

The traceback:

File "/home/me/.virtualenvs/starbase3/lib/python3.3/site-packages/requests-1.2.3-py3.3.egg/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
ImportError: cannot import name urllib3

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
radzhomecommented, Jan 11, 2018

I just downgraded to an old version of urllib3 (from 1.22) and it fixed the problem. The issue came up for me on a fresh install of elasticsearch python client. Fix:

pip install urllib3==1.15
0reactions
Bbertatumcommented, Feb 26, 2018

@radzhome usefull tips, with this I can install awx

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python urllib3 error - ImportError: cannot import name ...
Another issue could be that, urllib3 was installed via pip, and requests installed via yum repo, or vice-versa. In that case, the fix...
Read more >
ImportError: cannot import name 'urllib3' - Python Help
Hello there, fairly new to Python, getting an Import Error the package ... /3.10/lib/python3.10/site-packages/urllib3/request.py directory, ...
Read more >
Advanced Usage - urllib3 1.26.13 documentation
This happens on Python 2 platforms that have an outdated ssl module. These older ssl modules can cause some insecure requests to succeed...
Read more >
How to Fix the RequestsDependencyWarning Elasticsearch ...
Even though it lists both the urllib3 and chardet packages as being the potential problem, it is usually the Urllib3 that is causing...
Read more >
Repair or reinstall python - Newbie - EndeavourOS Forum
Hi all, I might have messed my python installation (to many ... in <module> import urllib3 File "/home/nuno/.local/lib/python3.10/site- ...
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