Cannot import urllib in Python
Question: I would like to import `urllib` to use the function '`request`'. However, I
encountered an error when trying to download via Pycharm:

> "Could not find a version that satisfies the requirement urllib (from
> versions: ) No matching distribution found for urllib"

I tried `pip install urllib` but still had the same error. I am using Python
2.7.11. Really appreciate any help


Answer: A few things:

  1. As metioned in the comments, `urllib` is not installed through `pip`, it is part of the standard library, so you can just do `import urllib` without installation. 
  2. Python 3.x has a [`urllib.request`](https://docs.python.org/3/library/urllib.request.html) module, but Python 2.x does not, as far as I know.
  3. The functionality that you are looking for from `urllib.request` is most likely contained in [`urllib2`](https://docs.python.org/2/library/urllib2.html#module-urllib2) (which is also part of the standard library), but you might be even better off using [`requests`](http://docs.python-requests.org/en/master/), which probably does need to be installed through `pip` in your case:
    
        pip install requests
    

In fact, the `urllib2` documentation itself recommends that you use the
`requests` library "for a higher-level HTTP client interface" - but I am not
sure what you wish to do, so it is hard to say what would be best for your
particular use case.

