简体   繁体   中英

How do I add the path to python for vscode

My util.py file is sited at the same directory with views.py, why do I still have the ImportError:

ImportError

Try to use this

from .utils import _function_or_class_name_

or

from .utils import *

Seems to me in the picture that the file is in the same folder just do a regular import

from util import function_or_class_name

or just import the file

import util

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM