im trying to install channels-redis using pip install -U pip channels-redis
but it cause the following error:
Error:
Using legacy 'setup.py install' for hiredis, since package 'wheel' is not installed.
Installing collected packages: hiredis, async-timeout, aioredis, channels-redis
Running setup.py install for hiredis ... error
error: subprocess-exited-with-error
× Running setup.py install for hiredis did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
C:\Users\APA\AppData\Local\Temp\pip-install-lvqc1hfx\hiredis_65bd53516444439e81ff8540ee5b60d1\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
import sys, imp, os, glob, io
C:\Users\APA\Desktop\KM-APP\KM\Repo\env\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
warnings.warn(
running install
C:\Users\APA\Desktop\KM-APP\KM\Repo\env\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-310
creating build\lib.win-amd64-cpython-310\hiredis
copying hiredis\version.py -> build\lib.win-amd64-cpython-310\hiredis
copying hiredis\__init__.py -> build\lib.win-amd64-cpython-310\hiredis
copying hiredis\hiredis.pyi -> build\lib.win-amd64-cpython-310\hiredis
copying hiredis\py.typed -> build\lib.win-amd64-cpython-310\hiredis
running build_ext
building 'hiredis.hiredis' 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.
╰─> hiredis
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
so after this i tried to install hiredis but it gave me the same error then i updated my pip and tried again but its still the same...any solution how to fix this issue ? i also installed wheel thought maybe it will help
CodePudding user response:
The current version of redis does not support Python 3.10 Try using lower versions of python
CodePudding user response:
The current latest version of hiredis
2.0 provides wheels for Python 3.6-3.9 but not 3.10 or later. Use lower version of Python.
Or install Microsoft Visual C 14.0 to compile C/C extensions.