Django channels install failure in Windows 10

烂漫一生 提交于 2020-08-23 13:09:51

问题


Here is the environment:

  • OS:windows 10
  • Django:2.0rc
  • Python:3.6
  • pip:10.0.0
  • visual studio community 2017

And the error message:

running build_ext
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual 
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

Command "c:\users\airy\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, 
tokenize;__file__='C:\\Users\\Airy\\AppData\\Local\\Temp\\pip-install-0a1gjuaj\\twisted\\
setup.py';f=getattr(tokenize, 'open', open) 
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, 
__file__, 'exec'))" install --record C:\Users\Airy\AppData\Local\Temp
\pip-record-k1vjz5aa\install-record.txt --single-version-externally-managed 
--compile" failed with error code 1 in C:\Users\Airy\AppData\Local\Temp\pip-install-0a1gjuaj\twisted\

I have already installed the build tools following the link description but it still doesn't work. If someone has solved it, please tell me how to fixed it.


回答1:


Download twisted from this link.
Downloading Twisted‑18.4.0‑cp36‑cp36m‑win32.whl worked for me because I'm using Python 3.6. Download the version according to the python that you use.
After you download Twisted from the given link, open up a cmd where the file is located and run pip install Twisted‑18.4.0‑cp36‑cp36m‑win32.whl. pip will install Twisted from this file.
If you're doing it in a virtualenv, activate the virtualenv and install Twisted after that in the same process.
After that, you'll be able to install channels or whatever.



来源:https://stackoverflow.com/questions/50128924/django-channels-install-failure-in-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!