Когда я пытаюсь установить psycopg2-binary на свою машину windows, возникает ошибка
Я пытался установить библиотеки из файла requirements.txt, и он выдает следующую ошибку.
requirements.txt
- psycopg2-binary==2.9.1
Сообщение об ошибке выглядит так,
Collecting psycopg2-binary==2.9.1 (from -r requirements.txt (line 6))
Using cached psycopg2-binary-2.9.1.tar.gz (380 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psycopg2-binary
Building wheel for psycopg2-binary (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for psycopg2-binary (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-312
creating build\lib.win-amd64-cpython-312\psycopg2
copying lib\errorcodes.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\errors.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\extensions.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\extras.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\pool.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\sql.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\tz.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\_ipaddress.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\_json.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\_range.py -> build\lib.win-amd64-cpython-312\psycopg2
copying lib\__init__.py -> build\lib.win-amd64-cpython-312\psycopg2
running build_ext
building 'psycopg2._psycopg' extension
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/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2-binary
Failed to build psycopg2-binary
ERROR: Could not build wheels for psycopg2-binary, which is required to install pyproject.toml-based projects
Я тоже установил Postgres с клиентом pgAdmin на локальной машине, но все равно выдает ту же ошибку.