简体   繁体   中英

Unable to import 'app.xxx' with pylint (vscode, virtualenv)

I'm trying to import one of my django apps but i receive this error: Unable to import 'apps.videoclub.views'pylint(E0401)

I'm working in a virtualenv

I already tried:

  • Modify my pylintrc file with this: init-hook='import sys; sys.path.append("C:/Users/Angel/Desktop/Trabajos/videoclub_django_new/videoclub_django_new/videoclub_django/")' pylintrc
  • Modify my workspace settings with the absolute path workspace I know that i can remove those errors but i want to do it the right way.

Maybe this image could be helpful

context

Thank you guys!

您可以在虚拟环境中安装 pylint,也可以使用pylint-venv包来使用系统安装的 pylint。

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