Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing hiredis in python:3.10 or later fails building wheel (Windows Containers) #753

Closed
mateokurti opened this issue Sep 3, 2022 · 1 comment

Comments

@mateokurti
Copy link

I was previosly using python:3.9 (latest version of 3.9) and was running the same application in both, linux and windows containers. Lately, I upgraded python version to python:3.10 and the deployment on linux seems to work fine. However, the windows version fails with the following errors. Apparently, installing building wheel for hiredis==2.0.0 is failing. Since it is a problem only occurring in windows and only on python:3.10 or later, I thought about reporting it here.

I'm also attaching the logs which seems relevant to the case.

2022-09-02T11:05:18.1513227Z Digest: sha256:745efdfb7e4aac9a8422bd8c62d8bc35a693e8979a240d29677cb03e6aa91052
2022-09-02T11:05:18.1513894Z Status: Downloaded newer image for python:3.10.6
2022-09-02T11:05:18.1520937Z docker.io/library/python:3.10.6
2022-09-02T11:05:18.1530302Z [command]"C:\Program Files\Docker\docker.exe" inspect python:3.10.6
2022-09-02T11:05:19.1739509Z [
2022-09-02T11:05:19.1739837Z     {
2022-09-02T11:05:19.1740193Z         "Id": "sha256:3c8130865bbdffd801f0372ab8d83901e6f0fcfd2b25e30f412afc39f4a1271d",
2022-09-02T11:05:19.1742476Z         "RepoTags": [
2022-09-02T11:05:19.1742731Z             "python:3.10.6"
2022-09-02T11:05:19.1742990Z         ],
2022-09-02T11:05:19.1743228Z         "RepoDigests": [
2022-09-02T11:05:19.1743591Z             "python@sha256:745efdfb7e4aac9a8422bd8c62d8bc35a693e8979a240d29677cb03e6aa91052"
2022-09-02T11:05:19.1743963Z         ],
2022-09-02T11:05:19.1744201Z         "Parent": "",
2022-09-02T11:05:19.1744436Z         "Comment": "",
2022-09-02T11:05:19.1744736Z         "Created": "2022-08-12T00:33:41.9360842Z",
2022-09-02T11:05:19.1745149Z         "Container": "43a42efed20a756d5e3c710d5b6017bacd98fbc7829b10d334807b89553fbfdf",
2022-09-02T11:05:19.1745498Z         "ContainerConfig": {
2022-09-02T11:05:19.1745791Z             "Hostname": "43a42efed20a",
2022-09-02T11:05:19.1746066Z             "Domainname": "",
2022-09-02T11:05:19.1746300Z             "User": "",
2022-09-02T11:05:19.1746558Z             "AttachStdin": false,
2022-09-02T11:05:19.1746846Z             "AttachStdout": false,
2022-09-02T11:05:19.1747117Z             "AttachStderr": false,
2022-09-02T11:05:19.1747382Z             "Tty": false,
2022-09-02T11:05:19.1747717Z             "OpenStdin": false,
2022-09-02T11:05:19.1747970Z             "StdinOnce": false,
2022-09-02T11:05:19.1748363Z             "Env": [
2022-09-02T11:05:19.1748632Z                 "PYTHONIOENCODING=UTF-8",
2022-09-02T11:05:19.1748908Z                 "PYTHON_VERSION=3.10.6",
2022-09-02T11:05:19.1749208Z                 "PYTHON_PIP_VERSION=22.2.1",
2022-09-02T11:05:19.1749642Z                 "PYTHON_SETUPTOOLS_VERSION=63.2.0",
2022-09-02T11:05:19.1750092Z                 "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/5eaac1050023df1f5c98b173b248c260023f2278/public/get-pip.py",
2022-09-02T11:05:19.1750632Z                 "PYTHON_GET_PIP_SHA256=5aefe6ade911d997af080b315ebcb7f882212d070465df544e1175ac2be519b4"
2022-09-02T11:05:19.1751002Z             ],
2022-09-02T11:05:19.1751232Z             "Cmd": [
2022-09-02T11:05:19.1751511Z                 "powershell",
2022-09-02T11:05:19.1753066Z                 "-Command",
2022-09-02T11:05:19.1753576Z                 "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';",
2022-09-02T11:05:19.1754030Z                 "#(nop) ",
2022-09-02T11:05:19.1754413Z                 "CMD [\"python\"]"
2022-09-02T11:05:19.1754757Z             ],
2022-09-02T11:05:19.1755211Z             "Image": "sha256:29df42d994e601ed2ee277a646b5fdd95289e4a9adc1abeb14d54d02f168b9f2",
2022-09-02T11:05:19.1755703Z             "Volumes": null,
2022-09-02T11:05:19.1756086Z             "WorkingDir": "",
2022-09-02T11:05:19.1756448Z             "Entrypoint": null,
2022-09-02T11:05:19.1756804Z             "OnBuild": null,
2022-09-02T11:05:19.1757170Z             "Labels": {},
2022-09-02T11:05:19.1757517Z             "Shell": [
2022-09-02T11:05:19.1757856Z                 "powershell",
2022-09-02T11:05:19.1758213Z                 "-Command",
2022-09-02T11:05:19.1758671Z                 "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"
2022-09-02T11:05:19.1759109Z             ]
2022-09-02T11:05:19.1759423Z         },
2022-09-02T11:05:19.1759782Z         "DockerVersion": "20.10.8",
2022-09-02T11:05:19.1760160Z         "Author": "",
2022-09-02T11:05:19.1760497Z         "Config": {
2022-09-02T11:05:19.1760861Z             "Hostname": "",
2022-09-02T11:05:19.1761222Z             "Domainname": "",
2022-09-02T11:05:19.1761564Z             "User": "",
2022-09-02T11:05:19.1761927Z             "AttachStdin": false,
2022-09-02T11:05:19.1762309Z             "AttachStdout": false,
2022-09-02T11:05:19.1762697Z             "AttachStderr": false,
2022-09-02T11:05:19.1763058Z             "Tty": false,
2022-09-02T11:05:19.1763422Z             "OpenStdin": false,
2022-09-02T11:05:19.1763794Z             "StdinOnce": false,
2022-09-02T11:05:19.1764135Z             "Env": [
2022-09-02T11:05:19.1764576Z                 "PYTHONIOENCODING=UTF-8",
2022-09-02T11:05:19.1764986Z                 "PYTHON_VERSION=3.10.6",
2022-09-02T11:05:19.1766042Z                 "PYTHON_PIP_VERSION=22.2.1",
2022-09-02T11:05:19.1766462Z                 "PYTHON_SETUPTOOLS_VERSION=63.2.0",
2022-09-02T11:05:19.1767002Z                 "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/5eaac1050023df1f5c98b173b248c260023f2278/public/get-pip.py",
2022-09-02T11:05:19.1767661Z                 "PYTHON_GET_PIP_SHA256=5aefe6ade911d997af080b315ebcb7f882212d070465df544e1175ac2be519b4"
2022-09-02T11:05:19.1768136Z             ],
2022-09-02T11:05:19.1768474Z             "Cmd": [
2022-09-02T11:05:19.1768811Z                 "python"
2022-09-02T11:05:19.1769149Z             ],
2022-09-02T11:05:19.1769615Z             "Image": "sha256:29df42d994e601ed2ee277a646b5fdd95289e4a9adc1abeb14d54d02f168b9f2",
2022-09-02T11:05:19.1770096Z             "Volumes": null,
2022-09-02T11:05:19.1770446Z             "WorkingDir": "",
2022-09-02T11:05:19.1770820Z             "Entrypoint": null,
2022-09-02T11:05:19.1771202Z             "OnBuild": null,
2022-09-02T11:05:19.1771555Z             "Labels": null,
2022-09-02T11:05:19.1771910Z             "Shell": [
2022-09-02T11:05:19.1772262Z                 "powershell",
2022-09-02T11:05:19.1772614Z                 "-Command",
2022-09-02T11:05:19.1773154Z                 "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"
2022-09-02T11:05:19.1773598Z             ]
2022-09-02T11:05:19.1773920Z         },
2022-09-02T11:05:19.1774262Z         "Architecture": "amd64",
2022-09-02T11:05:19.1774640Z         "Os": "windows",
2022-09-02T11:05:19.1775025Z         "OsVersion": "10.0.17763.3287",
2022-09-02T11:05:19.1775402Z         "Size": 5709988551,
2022-09-02T11:05:19.1775780Z         "VirtualSize": 5709988551,
2022-09-02T11:05:19.1776155Z         "GraphDriver": {
2022-09-02T11:05:19.1776505Z             "Data": {
2022-09-02T11:05:19.1776998Z                 "dir": "C:\\ProgramData\\docker\\windowsfilter\\a7cad8c6bef59446b4545d66774d4c0cdac795f8b007cd6d166916ce4bb49750"
2022-09-02T11:05:19.1777506Z             },
2022-09-02T11:05:19.1777885Z             "Name": "windowsfilter"
2022-09-02T11:05:19.1778236Z         },
2022-09-02T11:05:19.1778559Z         "RootFS": {
2022-09-02T11:05:19.1778927Z             "Type": "layers",
2022-09-02T11:05:19.1779276Z             "Layers": [
2022-09-02T11:05:19.1779745Z                 "sha256:d6fdd6832d95a5f537e0e7d87f2613ea9741ad9c20438b9d5a2697a883c4cd96",
2022-09-02T11:05:19.1780329Z                 "sha256:ccc004b169ee6b7194527fa6d6b7426e2943474955f102a36dfa9570705b2d60",
2022-09-02T11:05:19.1780903Z                 "sha256:7c01b84090896fffa209fcd821a841b91dac0ea2e465fe68c1589a7bc2f82c14",
2022-09-02T11:05:19.1781476Z                 "sha256:6975da7039c8fb7c71b9213ff334d901acdb6f986fdbddcfd9660455d6313cbd",
2022-09-02T11:05:19.1832636Z                 "sha256:6d5bfdf5ba3f104076b83b90a253727ca00a151a7bb1983a3171b2c6eefbe173",
2022-09-02T11:05:19.1848169Z                 "sha256:dcfac0de8780416f4f9dfdfde615d4e456c50392b65f53ff5391b04046e3d150",
2022-09-02T11:05:19.1854834Z                 "sha256:38e5c519e9e157017cd5099855e10419c2b57f2562f1fc51787ec561a120c3a8",
2022-09-02T11:05:19.1855692Z                 "sha256:0cc473a8eb79280e5101f7ca496c03e5f2ce9ba76984103ace5fad989849fb35",
2022-09-02T11:05:19.1873791Z                 "sha256:eac37d4286c6cd07067355abd701b55e0f06a9dfad24d97015bade1e50c61da2",
2022-09-02T11:05:19.1874931Z                 "sha256:68626b965a3d9c4e94f87fd8eefe79a20600e15914825cd9bf3b6fcc48e19229",
2022-09-02T11:05:19.1875569Z                 "sha256:01e0234c360959ea1d980567a3fd106e1f6f4b2c1a68c3eafb3d39e4655dfdd7",
2022-09-02T11:05:19.1876157Z                 "sha256:656d77b78b8af23a57f87ba4aa1cd36420b1b5e63755efff31d30b64a049634c"
2022-09-02T11:05:19.1876616Z             ]
2022-09-02T11:05:19.1876937Z         },
2022-09-02T11:05:19.1877282Z         "Metadata": {
2022-09-02T11:05:19.1877704Z             "LastTagTime": "0001-01-01T00:00:00Z"
2022-09-02T11:05:19.1878087Z         }
2022-09-02T11:05:19.1878664Z     }
2022-09-02T11:05:19.1878987Z ]
2022-09-02T11:05:19.1922794Z [command]"C:\Program Files\Docker\docker.exe" build -f D:\a\1\s\backend\Dockerfile_win_worker --label com.visualstudio.tlkenergy.image.system.teamfoundationcollectionuri=https://tlkenergy.visualstudio.com/ --label com.visualstudio.tlkenergy.image.system.teamproject=odineapps --label com.visualstudio.tlkenergy.image.build.repository.name=tlkenergy/odineapps --label com.visualstudio.tlkenergy.image.build.sourceversion=9a3dc0669a5d613f6eef53a72b749671f49c4815 --label com.visualstudio.tlkenergy.image.build.repository.uri=https://bitbucket.org/tlkenergy/odineapps --label com.visualstudio.tlkenergy.image.build.sourcebranchname=develop --label com.visualstudio.tlkenergy.image.build.definitionname=tlkenergy.odineapps --label com.visualstudio.tlkenergy.image.build.buildnumber=20220902.1 --label com.visualstudio.tlkenergy.image.build.builduri=vstfs:///Build/Build/224 --label image.base.ref.name=python:3.10.6 --label image.base.digest=sha256:745efdfb7e4aac9a8422bd8c62d8bc35a693e8979a240d29677cb03e6aa91052 -t odine-backend-windows:latest D:\a\1\s\backend
2022-09-02T11:05:19.6481087Z Sending build context to Docker daemon  1.263MB
2022-09-02T11:05:19.6481844Z
2022-09-02T11:05:19.6488099Z Step 1/24 : FROM python:3.10.6
2022-09-02T11:05:19.6494803Z  ---> 3c8130865bbd

...

2022-09-02T11:07:08.3125570Z Collecting hiredis
2022-09-02T11:07:08.3266521Z   Downloading hiredis-2.0.0.tar.gz (75 kB)
2022-09-02T11:07:08.3300020Z      ---------------------------------------- 75.8/75.8 kB ? eta 0:00:00

...

2022-09-02T11:07:24.7599974Z   Building wheel for hiredis (setup.py): started
2022-09-02T11:07:25.2148577Z   Building wheel for hiredis (setup.py): finished with status 'error'
2022-09-02T11:07:25.2213660Z [91m  error: subprocess-exited-with-error
2022-09-02T11:07:25.2214847Z
2022-09-02T11:07:25.2215562Z   × python setup.py bdist_wheel did not run successfully.
2022-09-02T11:07:25.2223286Z   │ exit code: 1
2022-09-02T11:07:25.2223687Z   ╰─> [17 lines of output]
2022-09-02T11:07:25.2224453Z       C:\Users\ContainerAdministrator\AppData\Local\Temp\pip-install-2aa3rzhj\hiredis_12b42ad0a7154868bba083b970b54850\setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
2022-09-02T11:07:25.2225511Z         import sys, imp, os, glob, io
2022-09-02T11:07:25.2226125Z      [0m[91m C:\Python\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
2022-09-02T11:07:25.2226698Z         warnings.warn(
2022-09-02T11:07:25.2226997Z       running bdist_wheel
2022-09-02T11:07:25.2227276Z       running build
2022-09-02T11:07:25.2227582Z      [0m[91m running build_py
2022-09-02T11:07:25.2227871Z       creating build
2022-09-02T11:07:25.2228183Z       creating build\lib.win-amd64-cpython-310
2022-09-02T11:07:25.2228512Z       creating build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:25.2228917Z       copying hiredis\version.py -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:25.2229348Z       copying hiredis\__init__.py -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:25.2229752Z       copying hiredis\hiredis.pyi -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:25.2230179Z       copying hiredis\py.typed -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:25.2230641Z       running build_ext
2022-09-02T11:07:25.2230915Z       building 'hiredis.hiredis' extension
2022-09-02T11:07:25.2231420Z       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/
2022-09-02T11:07:25.2231887Z       [end of output]
2022-09-02T11:07:25.2232129Z
2022-09-02T11:07:25.2232438Z   note: This error originates from a subprocess, and is likely not a problem with pip.
2022-09-02T11:07:25.2232841Z [0m[91m  ERROR: Failed building wheel for hiredis
2022-09-02T11:07:25.2233192Z [0m  Running setup.py clean for hiredis
2022-09-02T11:07:25.6398759Z Successfully built django-json-widget dj-rest-auth django-allauth autobahn pendulum coreschema future zope.interface
2022-09-02T11:07:25.6401551Z Failed to build hiredis
2022-09-02T11:07:26.5060991Z Installing collected packages: webencodings, twisted-iocpsupport, pywin32, pytz, pyasn1, msgpack, lark-parser, itypes, incremental, constantly, brotli, zopfli, zope.interface, XlsxWriter, wrapt, urllib3, uritemplate, tzdata, typing-extensions, txaio, tinycss2, sqlparse, six, pytzdata, pyrsistent, Pyphen, pyparsing, PyJWT, pydyf, pycparser, pyasn1-modules, psutil, prometheus-client, Pillow, oauthlib, numpy, mysqlclient, MarkupSafe, lxml, jmespath, idna, hiredis, future, fonttools, django-environ, defusedxml, charset-normalizer, certifi, attrs, async-timeout, asgiref, unittest-xml-reporting, requests, python3-openid, python-dateutil, packaging, jsonschema, Jinja2, hyperlink, html5lib, dramatiq, django-json-widget, django, deprecated, cssselect2, cffi, Automat, aioredis, weasyprint, twisted, requests-oauthlib, redis, pendulum, pandas, model-bakery, jsonfield, fmpy, djangorestframework, django-storages, django-safedelete, django-reversion, django-health-check, django_dramatiq, django-debug-toolbar, django-cors-headers, cryptography, coreschema, botocore, service-identity, s3transfer, pyopenssl, periodiq, djangorestframework-simplejwt, dj-rest-auth, coreapi, autobahn, django-allauth, boto3, django-ses, daphne, channels, channels-redis
2022-09-02T11:07:38.5715087Z   Running setup.py install for hiredis: started
2022-09-02T11:07:39.1067346Z   Running setup.py install for hiredis: finished with status 'error'
2022-09-02T11:07:39.1113228Z [91m  error: subprocess-exited-with-error
2022-09-02T11:07:39.1116191Z
2022-09-02T11:07:39.1117389Z   × [0m[91mRunning setup.py install for hiredis did not run successfully.
2022-09-02T11:07:39.1120701Z   │ exit code: 1
2022-09-02T11:07:39.1121654Z   ╰─> [19 lines of output]
2022-09-02T11:07:39.1122664Z       [0m[91mC:\Users\ContainerAdministrator\AppData\Local\Temp\pip-install-2aa3rzhj\hiredis_12b42ad0a7154868bba083b970b54850\setup.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
2022-09-02T11:07:39.1123864Z         import sys, imp, os, glob, io
2022-09-02T11:07:39.1124613Z       C:\Python\lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
2022-09-02T11:07:39.1125254Z         warnings.warn(
2022-09-02T11:07:39.1125644Z       running install
2022-09-02T11:07:39.1126281Z       C:\Python\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
2022-09-02T11:07:39.1126919Z         warnings.warn(
2022-09-02T11:07:39.1127264Z       running build
2022-09-02T11:07:39.1127683Z       running build_py
2022-09-02T11:07:39.1128059Z       creating build
2022-09-02T11:07:39.1129911Z       creating build\lib.win-amd64-cpython-310
2022-09-02T11:07:39.1131511Z       creating build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:39.1132110Z       copying hiredis\version.py -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:39.1134486Z       copying hiredis\__init__.py -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:39.1135110Z       copying hiredis\hiredis.pyi -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:39.1136454Z       copying hiredis\py.typed -> build\lib.win-amd64-cpython-310\hiredis
2022-09-02T11:07:39.1138680Z       running build_ext
2022-09-02T11:07:39.1139414Z       building 'hiredis.hiredis' extension
2022-09-02T11:07:39.1142068Z       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/
2022-09-02T11:07:39.1144092Z       [end of output]
2022-09-02T11:07:39.1146703Z
2022-09-02T11:07:39.1147277Z   note: This error originates from a subprocess, and is likely not a problem with pip.
2022-09-02T11:07:39.1147902Z [0m[91merror: legacy-install-failure
2022-09-02T11:07:39.1149333Z
2022-09-02T11:07:39.1150780Z × Encountered error while trying to install package.
2022-09-02T11:07:39.1152853Z ╰─> hiredis
2022-09-02T11:07:39.1153216Z
2022-09-02T11:07:39.1153645Z note: This is an issue with the package mentioned above, not pip.
2022-09-02T11:07:39.1154159Z hint: See above for output from the failure.
2022-09-02T11:07:42.8673648Z [0mThe command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; pip3 install --no-cache-dir -r /tmp/requirements.txt' returned a non-zero code: 1
2022-09-02T11:07:42.8774578Z ##[error]The process 'C:\Program Files\Docker\docker.exe' failed with exit code 1
2022-09-02T11:07:42.8857621Z ##[section]Finishing: Build an image
@tianon
Copy link
Member

tianon commented Sep 6, 2022

From what I can tell, hiredis doesn't support Python 3.10 yet (it's supported in their master branch via redis/hiredis-py#117, but I don't think that's in a release yet).

@tianon tianon closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants