当我运行django服务器时,它说" ModuleNotFoundError:没有名为' ws4redis'"的模块。
当我尝试使用PIP命令安装ws4redis时,我说语法错误。
pip install django-websocket-redis
以下是错误的追溯:
Collecting django-websocket-redis
Using cached django-websocket-redis-0.5.1.tar.gz
Exception:
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/anaconda3/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/anaconda3/lib/python3.6/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/anaconda3/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/anaconda3/lib/python3.6/site-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/anaconda3/lib/python3.6/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/anaconda3/lib/python3.6/site-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/anaconda3/lib/python3.6/site-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "/Users/ranjan/.local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/Users/ranjan/.local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/Users/ranjan/.local/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 103
except ValueError, e:
^
SyntaxError: invalid syntax