vscode import error for python module

后端 未结 9 1987
栀梦
栀梦 2020-12-02 20:26

I am trying to do an import in python from one directory level up.

import sys

sys.path.append(\'..\')
from cn_modules import exception

I g

9条回答
  •  心在旅途
    2020-12-02 21:09

    i did nothing but to add header in the beginning

    #!/usr/bin/env python
    

    that fixed my problem... maybe it will help somebody who is new just like me

提交回复
热议问题