pip broke after uninstalling a module
Question: I used pip uninstall on shapely and got an exception, which I did not save.
Since then every pip or easy install command will pop this exception :

    
    
    Traceback (most recent call last):
      File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
        "__main__", fname, loader, pkg_name)
      File "C:\Python27\lib\runpy.py", line 72, in _run_code
        exec code in run_globals
      File "C:\Python27\Scripts\pip.exe\__main__.py", line 5, in <module>
      File "C:\Python27\lib\site-packages\pip\__init__.py", line 13, in <module>
        from pip.utils import get_installed_distributions, get_prog
      File "C:\Python27\lib\site-packages\pip\utils\__init__.py", line 17, in <module>
        from pip.compat import console_to_str, stdlib_pkgs
      File "C:\Python27\lib\site-packages\pip\compat\__init__.py", line 14, in <module>
        from pip.compat.dictconfig import dictConfig as logging_dictConfig
      File "C:\Python27\lib\site-packages\pip\compat\dictconfig.py", line 22, in <module>
        import logging.handlers
      File "C:\Python27\lib\logging\handlers.py", line 27, in <module>
        import logging, socket, os, cPickle, struct, time, re
      File "C:\Python27\lib\socket.py", line 47, in <module>
        import _socket
    ImportError: No module named _socket
    

Any ideas?


Answer: See this [bug](https://github.com/pypa/pip/issues/727).

Off the top, `pip uninstall shapely` seems to be removing the top dlls from
the Python installations. This is why you see the error on every pip command
after.

