1

I keep receiving an "unresolved import" error for a series of modules that my project relies on.

I've tried implementing the recommendations offered in the following two articles: https://code.visualstudio.com/docs/python/environments#_environment-variable-definitions-file Visual Studio Code - How to add multiple paths to python path?

In particular, I created a ".env" file in my VS Code workspace; the file has the following contents: "PYTHONPATH": "c:\pct\pct-primary-internet-website\wagtail-src\wagtail"

My application code is in "c:\pct" however the module that VS Code is unable to find is located in the following directory: C:\PCT\pct-primary-internet-website\wagtail-src\wagtail

1 Answers1

0

It looks like you wrote your .env file using JSON syntax versus the syntax the file expects. Try:

PYTHONPATH=c:\pct\pct-primary-internet-website\wagtail-src\wagtail
Brett Cannon
  • 14,438
  • 3
  • 45
  • 40