Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

urllib.request module fails to install in my system

Tried installing urllib.request module using below command

sudo pip install urllib.request

but it returned

Downloading/unpacking urllib.request
  Could not find any downloads that satisfy the requirement urllib.request
Cleaning up...
No distributions at all found for urllib.request
Storing debug log for failure in /home/mounarajan/.pip/pip.log

How can I install this module?

like image 858
Mounarajan Avatar asked Apr 01 '15 04:04

Mounarajan


People also ask

What is Urllib error in Python?

URLError – It is raised for the errors in URLs, or errors while fetching the URL due to connectivity, and has a 'reason' property that tells a user the reason of error. HTTPError – It is raised for the exotic HTTP errors, such as the authentication request errors. It is a subclass or URLError.

What is Urllib module in Python?

urllib is a package that collects several modules for working with URLs: urllib. request for opening and reading URLs. urllib. error containing the exceptions raised by urllib.


2 Answers

urllib.request is only available in python3 branch. See the following post for more info. urllib.request in Python 2.7

like image 52
Kozyarchuk Avatar answered Sep 27 '22 20:09

Kozyarchuk


For Python3 in cmd,

pip install urllib3

Or if you're using a anaconda:

conda install urllib3

Hope, this will help you

like image 32
user99 Avatar answered Sep 27 '22 22:09

user99