网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

MicrosoftVisualC++14.0isrequired

总所周知 ujson 要比 json 模块高效,可是安装也太麻烦了。之前在 Windows7 中使用 Python2.x 的第三方模块 ujson ,使用pip install ujson 安装时没有问题的,换成 Windows10 的时候报错了。

颍州网站制作公司哪家好,找创新互联建站!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设公司等网站项目制作,到程序开发,运营维护。创新互联建站自2013年创立以来到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联建站

报错如下:
C:\>pip install ujson
Collecting ujson
  Downloading https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz (192kB)
    100% |████████████████████████████████| 194kB 64kB/s
Building wheels for collected packages: ujson
  Running setup.py bdist_wheel for ujson ... error
  Complete output from command c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\niko\\AppData\\Local\\Temp\\pip-install-6naov7i3\\ujson\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\niko\AppData\Local\Temp\pip-wheel-v4jxz935 --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building 'ujson' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

  ----------------------------------------
  Failed building wheel for ujson
  Running setup.py clean for ujson
Failed to build ujson
Installing collected packages: ujson
  Running setup.py install for ujson ... error
    Complete output from command c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\niko\\AppData\\Local\\Temp\\pip-install-6naov7i3\\ujson\\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\niko\AppData\Local\Temp\pip-record-dnr78gng\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'ujson' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    ----------------------------------------
Command "c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\niko\\AppData\\Local\\Temp\\pip-install-6naov7i3\\ujson\\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\niko\AppData\Local\Temp\pip-record-dnr78gng\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\niko\AppData\Local\Temp\pip-install-6naov7i3\ujson\
大体意思就是缺少编译ujson的C++编译工具,经过查阅得知:

Python 2.7需要Microsoft Visual C++ 9.0的库
Python 3.6需要Microsoft Visual C++ 14.0的库

很显然,解决方案只有两种了:
  • 下载whl文件直接安装(Python2和Python3适用)
    下载地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/
    在这里可以搜索你想要的库!!!
    使用 pip install xxx.whl 安装即可。
  • 下载Microsoft Visual C++ Build Tools(Python3适用)
    下载微软的C++编译工具,CSDN上下载竟然花钱,气死我了...我特么还是学生呢...在这里下载吧,免费的:http://down.51cto.com/data/2452424
    下载完成使用管理员权限打开,安装Windows10SDK和.NET框架即可!!!

新闻名称:MicrosoftVisualC++14.0isrequired
链接地址:http://bjjierui.cn/article/jieejs.html

其他资讯