2

I can't install psycopg2 on Win10 x64 / Python 3.8. When I run MyProject\venv>pip install psycopg2-binary

I've got error Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools

But I've already installed BuildTools (from https://visualstudio.microsoft.com/downloads/) and MS Visual C++ redistributable 2015-2019

Also I've tried to install prebuild binaries - https://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg but for any package (win_amd64 or win32) I've got error like "psycopg2-2.8.6-cp39-cp39-win32.whl is not a supported wheel on this platform."

Could you please help - how can I finally install them?

Arrovil
  • 865
  • 1
  • 8
  • 20
  • I recently had the same problem. I installed the oldest psycopg2 version I could find, that worked. Not a nice solution but might help you get going meanwhile – Karl Sep 12 '20 at 14:42
  • Better than nothing :) Could you please clarify what version did you use or give a link? – Arrovil Sep 12 '20 at 15:27
  • "psycopg2-2.8.6-cp39-cp39-win32.whl" is for 32-bit Python 3.9, not Python 3.8. – cgohlke Sep 13 '20 at 01:22
  • @cgohlke thanks, i tried it, but unfortunately the same for 3.8/x64 binaries: `psycopg2-2.8.6-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.` – Arrovil Sep 13 '20 at 07:21
  • Downgrade to python 3.7 or checkout [this answer](https://stackoverflow.com/questions/5420789/how-to-install-psycopg2-with-pip-on-python) – Christopher Kaggwa Jul 17 '22 at 18:29

0 Answers0