Python Forum

Full Version: Psycopg2 doesn't work with python2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Recentley i installed psycopg2 2.9 version and tried to connect it with python2.7 but nothing doesn't work ,my VS Code sends me an error:Import "psycopg2" could not be resolved from sourcePylancereportMissingModuleSource.How can i fix this?
Not surprised as python 2 has been obsolete since Jan 1, 2020.
so what i need to do then if i need to connect to PosgreSQL and python2?
You shouldn't be using Python 2 now, so you need to switch to 3.