on-internet
← Community

Using psycopg2 or other python module within Visual Code

Stack Overflow ·

I am using Visual Code and wanted to script some Python code that connects to a database. Psycopg2 seems to be the perfect library for just that. So I had in my settings.json file: { "python.linting.pylintEnabled": true, "python.autoComplete.extraPaths": [ "c:/OSGeo4W64/apps/python27", "C:/OSGeo4W64/apps/Python27/Lib/site-packages/psycopg2" ], "python.pythonPath": "C:/OSGeo4W64/bin/python.exe" } I still get the error 'no module named psycopg2' on the first line in my code: import psycopg2.

Comments

Sign in or sign up to comment and upvote.

No comments yet.