简体   繁体   English

安装 Django-channels 错误

[英]Installing Django-channels error

I'm trying to develop a chat application in Django on mac OS.我正在尝试在 Mac OS 上的 Django 中开发聊天应用程序。 I've tried to install Django-Channels in virtualenv, with this commands:我尝试使用以下命令在 virtualenv 中安装 Django-Channels:

pip install channels

pip install django-channels

but this error occurred:但是发生了这个错误:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/4c/xy3rtg_165l0650j4tq7fvrh0000gn/T/pip-install-7anqvzhg/twisted/命令“python setup.py egg_info”失败,错误代码 1 在 /private/var/folders/4c/xy3rtg_165l0650j4tq7fvrh0000gn/T/pip-install-7anqvzhg/twisted/

Python version = 3.5.2, Python 版本 = 3.5.2,
Django version = 1.11, Django 版本 = 1.11,
pip is already up-tp-date pip 已经是最新的

当我安装 Visual C++ 构建工具时,问题解决了。

this worked for me if you are using mac如果您使用的是 mac,这对我有用

xcode-select --install xcode-select --install

我认为如果您更新了 pip,您的问题将得到解决

Had similar problem, and this fixed it.有类似的问题,这解决了它。

Inside of virtual environment,在虚拟环境中,

pip install incremental then pip install channels pip install incremental然后pip install channels

you can check that it worked by running您可以通过运行来检查它是否有效

python3 -c 'import channels; print(channels.__version__)'

Looks like you have outdated version of setup tools.看起来您的安装工具版本已过时。 try:尝试:

pip install --upgrade setuptools

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM