On 2023-04-13 02:27, Mike Dewhirst wrote:
On 12/04/2023 10:59 pm, Mike Dewhirst wrote:
Sadly Windows is still in the dock. The jury is still out.
Turns out the "without a hitch" was based on cached wheels.
I'm going to start from scratch with new projects using Pythons 3.8,
3.10 and 3.11 and report back.
Report summary:
pip install works well with Python 3.8 and 3.10 (and presumably 3.9) but
3.11 fails.
Report conclusion:
As indicated in this thread, pip cannot find Python 3.11 wheels and
therefore needs to compile from source. It is looking for Microsoft's
C++ compiler version 14.
I'll (gulp) attempt to swallow the Koolaid.
See error below ...
Cheers
Mike
(xreq) D:\Users\mike\envs\xreq>pip install -r requirements\dev.txt
...
Collecting psycopg2==2.9.3
Downloading psycopg2-2.9.3.tar.gz (380 kB)
--------------------------------------- 380.6/380.6 kB 6.0 MB/s eta
0:00:00
Preparing metadata (setup.py) ... done
Collecting Pillow==9.1.1
Downloading Pillow-9.1.1.tar.gz (49.8 MB)
---------------------------------------- 49.8/49.8 MB 4.5 MB/s eta
0:00:00
Preparing metadata (setup.py) ... done
...
Installing collected packages: psycopg2, Pillow, ...
DEPRECATION: psycopg2 is being installed using the legacy 'setup.py
install' method, because it does not have a 'pyproject.toml' and the 'wheel'
package is not installed. pip 23.1 will enforce this behaviour change. A
possible replacement is to enable the '--use-pep517' option. Discussion can be
found athttps://github.com/pypa/pip/issues/8559
Running setup.py install for psycopg2 ... error
error: subprocess-exited-with-error
× Running setup.py install for psycopg2 did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
D:\Users\mike\envs\xreq\Lib\site-packages\setuptools\config\setupcfg.py:508:
SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use
license_files instead.
warnings.warn(msg, warning_class)
running install
D:\Users\mike\envs\xreq\Lib\site-packages\setuptools\command\install.py:34:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip
and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\psycopg2
copying lib\errorcodes.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\errors.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\extensions.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\extras.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\pool.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\sql.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\tz.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\_ipaddress.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\_json.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\_range.py -> build\lib.win-amd64-cpython-311\psycopg2
copying lib\__init__.py -> build\lib.win-amd64-cpython-311\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: legacy-install-failure
× Encountered error while trying to install package.
╰─> psycopg2
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
(xreq) D:\Users\mike\envs\xreq>
[snip]
C:\Users\mrab>py -3.11 -m pip install psycopg2
Collecting psycopg2
Downloading psycopg2-2.9.6-cp311-cp311-win_amd64.whl (1.2 MB)
---------------------------------------- 1.2/1.2 MB 2.4 MB/s eta
0:00:00
Installing collected packages: psycopg2
Successfully installed psycopg2-2.9.6
C:\Users\mrab>py -3.11 -m pip install Pillow
Requirement already satisfied: Pillow in c:\python311\lib\site-packages
(9.2.0)
--
https://mail.python.org/mailman/listinfo/python-list