简体   繁体   中英

Having problem trying to install psycopg2 on Windows 10

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM