使用Python 2.7,任何人都知道为什么我在请求2.2.1而不是ver 1.2.3中得到这个?以及如何解决这个问题?
Traceback (most recent call last):
File "krunchuploader.py", line 12, in <module>
from modules.core import confirm_customer_ddi, get_apikey
File "/home/one/trunk/stratus-krunch-uploader/stratus_krunch_uploader/modules/core.py", line 8, in <module>
import requests
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/utils.py", line 25, in <module>
from .compat import parse_http_list as _parse_list_header
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/compat.py", line 7, in <module>
from .packages import chardet
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 39, in <module>
from .request import RequestMethods
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/packages/urllib3/request.py", line 12, in <module>
from .filepost import encode_multipart_formdata
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/packages/urllib3/filepost.py", line 15, in <module>
from .fields import RequestField
File "/home/one/.virtualenvs/bot/local/lib/python2.7/site-packages/requests/packages/urllib3/fields.py", line 7, in <module>
import email.utils
ImportError: No module named utils
答案 0 :(得分:0)
我有一个我重命名的文件email.py,但是email.pyc仍然导致了这个问题。