Having problem trying to install psycopg2 on Windows 10

516 views Asked by At

I am using GIT to run the following command

$ python -m easy_install psycopg2-2.6.2.win32-py3.5-pg9.5.3-release.exe

When I do that I am running into this error

File "C:\Users\Nancy\AppData\Local\Temp\easy_install-z6mcndcr\psycopg2-2.6.2-py3.8-win32.egg.tmp\psycopg2\__init__.py", line 104
    connection_factory=None, cursor_factory=None, async=False, **kwargs):
                                                  ^
SyntaxError: invalid syntax

  File "C:\Users\Nancy\AppData\Local\Temp\easy_install-z6mcndcr\psycopg2-2.6.2-py3.8-win32.egg.tmp\psycopg2\tests\test_async.py", line 58
    self.conn = self.connect(async=True)

Can someone please help? Newbie here Thanks a lot

1

There are 1 answers

1
piro On

psycopg 2.6 doesn't support Python 3.5 or whatever version async became a keyword.

Please install the library from PyPI using python -m pip psycopg2 or building will likely fail.