Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Microsoft Visual C++;14.0是必需的。下载python包时出错_Python_Django - Fatal编程技术网

Microsoft Visual C++;14.0是必需的。下载python包时出错

Microsoft Visual C++;14.0是必需的。下载python包时出错,python,django,Python,Django,当我试图在我的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/deb4605

当我试图在我的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扩展,它的工作速度要慢得多。


因此,更好的解决方案是,1.1GB大小

@Chidananda Nayak您尝试过这个解决方案吗?