jim
jim

Reputation: 278

Visual Studio Python PIP Times out looking for urllib2

I am new to python on Visual Studio.

-----Here is my code-------------------------------

import urllib2


I need urllib2, but when I use PIP to get it, PIP times out.

What do I do? Do I setup a proxy? or can I manually import it somehow??

enter image description here

Upvotes: 0

Views: 812

Answers (1)

MattDMo
MattDMo

Reputation: 102862

urllib2 is only available in Python 2, and is included as part of the standard library, which is why pip can't find it. For Python 3, you can use the various components of urllib, or for a much easier time of it, use the excellent requests module, which is available via pip.

Upvotes: 1

Related Questions