这里是环境:
- 操作系统:windows 10
- Django:2.0rc
- Python:3.6
- 点:10.0.0
- 2017 年 Visual Studio 社区
错误信息:
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\
我已经按照链接描述安装了构建工具,但它仍然不起作用。如果有人解决了,请告诉我如何解决。
请您参考如下方法:
从这个 link 下载 twisted .
下载 Twisted‑18.4.0‑cp36‑cp36m‑win32.whl 对我有用,因为我使用的是 Python 3.6。根据您使用的python下载版本。
从给定链接下载 Twisted 后,打开文件所在的 cmd 并运行 pip install Twisted‑18.4.0‑cp36‑cp36m‑win32.whl。 pip 将从该文件安装 Twisted。
如果您在 virtualenv 中执行此操作,请激活 virtualenv,然后在同一过程中安装 Twisted。
之后,您将能够安装 channel 或其他任何内容。
