gpt4 book ai didi

python - 需要 Microsoft Visual C++ 14.0。下载python包时出错

转载 作者:行者123 更新时间:2023-12-01 01:42:58 24 4
gpt4 key购买 nike

当我尝试在我的 django 项目中下载 python 包“pip install django-compressor”时,出现此错误。那么,如何解决这个错误呢?

PS C:\Users\HP\Desktop\acornaccounting> pip install django-compressor
Collecting django-compressor
Using cached https://files.pythonhosted.org/packages/02/7b/deb4605f95bcefb9760ff130533553230a1c25f4d383ed0735b075d71b29/django_compressor-2.2-py2.py3-none-any.whl
Requirement already satisfied: django-appconf>=1.0 in c:\users\hp\appdata\local\programs\python\python36\lib\site-packages (from django-compressor) (1.0.2)
Collecting rjsmin==1.0.12 (from django-compressor)
Using cached https://files.pythonhosted.org/packages/10/9c/2c45f57d43258b05bf33cf8f6c8161ea5abf8b4776a5c59d12646727cd98/rjsmin-1.0.12.tar.gz
Collecting rcssmin==1.0.6 (from django-compressor)
Using cached https://files.pythonhosted.org/packages/e2/5f/852be8aa80d1c24de9b030cdb6532bc7e7a1c8461554f6edbe14335ba890/rcssmin-1.0.6.tar.gz
Installing collected packages: rjsmin, rcssmin, django-compressor
Running setup.py install for rjsmin ... error
Complete output from command c:\users\hp\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\HP\\AppData\\Local\\Temp\\pip-install-i9yu03ey\\rjsmin\\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\HP\AppData\Local\Temp\pip-record-sb4anuu2\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying .\rjsmin.py -> build\lib.win-amd64-3.6
running build_ext
building '_rjsmin' 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

最佳答案

试试这个,

pip install rcssmin --install-option="--without-c-extensions"
pip install rjsmin --install-option="--without-c-extensions"
pip install django-compressor --upgrade

这个解决方案运行良好,但如果没有 c 扩展,它的运行速度会慢得多。

所以更好的解决方案是,Intstall C++ dependencies ,大小1.1GB

关于python - 需要 Microsoft Visual C++ 14.0。下载python包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51690898/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com