PyCharm “no module named sys”

前端 未结 8 2233
后悔当初
后悔当初 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:41

    I had this problem as well and was completely stymied until I tried the following:

    File -> 
    Default Settings -> 
    Project Interpreter
      dropdown (click the arrow) ->
    Show All ->
      select your interpreter ->
    Show Paths
      (bottom icon on right) ->
    Add Path ->
      Enter path to libraries
      (in my case this was c:\Python35\Lib).
    

提交回复
热议问题