我使用 Python 3.2.3
今晚我尝试通过 pip 和 easy_install 安装来自http://docs.python-requests.org/en/latest/的请求,但它不起作用。尝试导入时出现错误。所以我决定使用标准库 urllib.request 并再次看到这个错误
那是回溯:
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "E:\Python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\__init__.py", line 52, in <module>
from . import utils
File "E:\Python32\lib\site-packages\requests-1.2.0-py3.2.egg\requests\utils.py", line 12, in <module>
import cgi
File "E:\Python32\lib\cgi.py", line 38, in <module>
from email.parser import FeedParser
File "E:\Python32\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "E:\Python32\lib\email\feedparser.py", line 27, in <module>
from email import message
File "E:\Python32\lib\email\message.py", line 17, in <module>
from email import utils
File "E:\Python32\lib\email\utils.py", line 28, in <module>
import socket
File "E:\Python32\lib\socket.py", line 46, in <module>
import _socket
ImportError: Module use of python26.dll conflicts with this version of Python.
那么我该如何解决这个问题呢?
UPD:已解决。这是 SublimeREPL 中的错误,重新安装了该软件包。