Django笔记 解决找不到vcvarsall.bat的错误

安装 django-compressor时,发生下面的错误
Error

Installing collected packages: rcssmin, rjsmin, django-compressor, sqlparse, django-debug-toolbar, django-ipware, libsas
s, django-libsass, django-suit, django-dynamic-preferences
  Running setup.py install for rcssmin ... error
    Complete output from command c:\users\czlee\git\tabbycat\venv\scripts\python.exe -u -c "import setuptools, tokenize;
__file__='C:\\Users\\czlee\\AppData\\Local\\Temp\\pip-build-idha5rwu\\rcssmin\\setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\czlee\AppData\Local\
Temp\pip-ev6w6zrs-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\czl
ee\git\tabbycat\venv\include\site\python3.4\rcssmin:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.4
    copying .\rcssmin.py -> build\lib.win-amd64-3.4
    running build_ext
    building '_rcssmin' extension
    error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

    ----------------------------------------
Command "c:\users\czlee\git\tabbycat\venv\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\czl
ee\\AppData\\Local\\Temp\\pip-build-idha5rwu\\rcssmin\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).
read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\czlee\AppData\Local\Temp\pip-ev6w6zrs-record
\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\czlee\git\tabbycat\venv\inc
lude\site\python3.4\rcssmin" failed with error code 1 in C:\Users\czlee\AppData\Local\Temp\pip-build-idha5rwu\rcssmin

解决办法

pip install wheel

pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"

参考
https://github.com/czlee/tabbycat/issues/265

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值