Skip to main content

Command Palette

Search for a command to run...

Fix PyLint error, unable to import frappe in VS Code

Published
1 min read
Fix PyLint error, unable to import frappe in VS Code
A

I will raise your revenues or decrease your costs using solutions based on logic and in most cases, it will involve a computer. Design - Build - Improve.


I design solutions to your business problem, build it with you and your team and finally scale the solution to fix other related problems.

I use Javascript and Python as the main languages for development but I am eager and faster to learn anything that would be put a solution on the table.

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.

More from this blog

V

Victor Abz

12 posts

Hello, I am Victor. I am a software engineer with corporate experience. Solution provider for #startups and #enterprise using Javascript (Node JS and React) | Python.