python 运行脚本报错 from keyword import iskeyword as _iskeyword ImportError: cannot import name iskeyword
Posted 夏晓旭
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 运行脚本报错 from keyword import iskeyword as _iskeyword ImportError: cannot import name iskeyword相关的知识,希望对你有一定的参考价值。
C:Python27Scripts>python task_test.py
Traceback (most recent call last):
File "task_test.py", line 2, in <module>
import unittest
File "C:Python27libunittest\__init__.py", line 58, in <module>
from .result import TestResult
File "C:Python27libunittest
esult.py", line 9, in <module>
from . import util
File "C:Python27libunittestutil.py", line 2, in <module>
from collections import namedtuple, OrderedDict
File "C:Python27libcollections.py", line 22, in <module>
from keyword import iskeyword as _iskeyword
ImportError: cannot import name iskeyword
我在装lettuce之后,运行lettuce发现报错,再然后运行其他脚本也报这个错,替换了别人的好用的python目录,也不行,重装就好了
以上是关于python 运行脚本报错 from keyword import iskeyword as _iskeyword ImportError: cannot import name iskeyword的主要内容,如果未能解决你的问题,请参考以下文章
关于基于python27使用 from pylab import * 报错问题
解决pycharm终端/cmd运行python脚本报错“ImportError/ModuleNotFoundError:No Module named ...”
pycharm运行appium desktop录制的python脚本报错问题:selenium.common.exceptions.InvalidSelectorException: Message: