pip version: 23.1.1
Python version: 3.9.11
OS: Windows 11
My python project is created and env is used as virtual environment. psycopg2 fails to install. According to log, "Failed building wheel for psycopg2" and it also shows that the "The license_file parameter is deprecated".
I have not found any solutions for my platform even though the solution exists for other platforms. Both wheel and setuptools are latest.
pip install psycopg2-binary
also does not work.
The full error is below:
(env) PS C:\\Aavash files\\COMP206\\Project\\Movie4AllMoods\> pip install psycopg2
Collecting psycopg2
Using cached psycopg2-2.9.6.tar.gz (383 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─\> \[34 lines of output\]
C:\\Aavash files\\COMP206\\Project\\Movie4AllMoods\\env\\lib\\python3.9\\site-packages\\setuptools\\config\\setupcfg.py:293: \_DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.mingw_x86_64-cpython-39
creating build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\errorcodes.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\errors.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\extensions.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\extras.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\pool.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\sql.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\tz.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\_ipaddress.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\_json.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\_range.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
copying lib\__init__.py -> build\lib.mingw_x86_64-cpython-39\psycopg2
running build_ext
building 'psycopg2._psycopg' extension
error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64')
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
Failed to build psycopg2
ERROR: Could not build wheels for psycopg2, which is required to install pyproject.toml-based projects
I have tried updating pip, wheel and setup tools but that didn't work. Everything else I found were linux commands that I have been unable to run. It installed fine in global but shows errors in my virtual environment. I have tried everything but nothing seems to work.
psycopg2-binary
. Is the error message the same there? It might be a version thing. I'll try test shortly – Korella