PyCharm “no module named sys”

前端 未结 8 2241
后悔当初
后悔当初 2021-02-06 22:58

Using PyCharm community edition and Python 2.7,

import traceback
import sys

No problem on the first line, which implies that I have pointed PyC

8条回答
  •  借酒劲吻你
    2021-02-06 23:36

    We actually no need of having "import sys" in pycharm. You can find this in 'os' module.

    For example,

    import os
    
    Sys = os.sys
    
    print("say , Good Bye")
    
    
    Sys.exit(0)
    
    print("Sorry, i am not exited")
    

    I hope it will work.

提交回复
热议问题