Python run the error from keyword import Iskeyword as _iskeyword importerror:cannot import name Iskeyword, indicating that the Python environment is bad, has to be re-installed, do not know the specific Reason

Source: Internet
Author: User

C:\python27\scripts>python task_test.py
Traceback (most recent):
File "task_test.py", line 2, <module>
Import UnitTest
File "C:\Python27\lib\unittest\__init__.py", line +, in <module>
From. Result Import TestResult
File "C:\Python27\lib\unittest\result.py", line 9, <module>
From. Import util
File "C:\Python27\lib\unittest\util.py", line 2, <module>
From collections import Namedtuple, ordereddict
File "C:\Python27\lib\collections.py", line A, in <module>
From keyword import Iskeyword as _iskeyword
Importerror:cannot Import Name Iskeyword

After I installed the lettuce, run lettuce found an error, and then run other scripts also reported this error, replaced someone else's good Python directory, no, re-install it

Python runs the error from keyword import Iskeyword as _iskeyword importerror:cannot import name Iskeyword, indicating that the python environment is broken and has to be re-installed, not yet For specific reasons,

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.