我在形状上使用了pip uninstall并得到了一个例外,我没有保存。 从那时起,每个pip或easy install命令都会弹出此异常:
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
有什么想法吗?