Error unable to import frappe in VScode
Assuming that your project root directory is inside /apps/
and that's also where frappe app is located.
create a .env
file in your project root directory and then add
PYTHONPATH=../frappe # your unresolved module path
Open your VS Code settings.json and add this line. This assumes that the open folder in vs code is your app.
"python.envFile": "${workspaceFolder}/.env"
If you don't want to push your .env to Github open .gitignore
in the project root folder and add .env
on a new line.