gpt4 book ai didi

python - 在 Python 2.7 中导入 urllib 或 urllib 2 失败,出现 ImportError : cannot import name iskeyword

转载 作者:行者123 更新时间:2023-11-28 23:05:28 27 4
gpt4 key购买 nike

我无法在我的 Python 2.6 或 Python 2.7 安装中导入 urllib 或 urllib2。

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/urllib.py", line 30, in <module>
from urlparse import urljoin as basejoin
File "/usr/lib/python2.7/urlparse.py", line 110, in <module>
from collections import namedtuple
File "/usr/lib/python2.7/collections.py", line 10, in <module>
from keyword import iskeyword as _iskeyword
ImportError: cannot import name iskeyword

谷歌搜索“无法导入名称是关键字”似乎也找不到答案。

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com