Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django channels install failure in Windows 10

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.

like image 469
Airy Avatar asked Dec 18 '22 23:12

Airy


1 Answers

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.

like image 185
Diptangsu Goswami Avatar answered Dec 28 '22 09:12

Diptangsu Goswami