Microsoft Visual C++ 14.0 is required

发布时间:2020-08-05 18:49:04 作者:BlueMiaomiao
来源:网络 阅读:21011

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

报错如下:
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的库

很显然,解决方案只有两种了:
推荐阅读:
  1. Microsoft SharePoint Server 2016 部署文档(1)
  2. Microsoft Office Online Server 2016 部署文档

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ujson bulidtools 14.0

上一篇:全网最简洁全排列源代码(递归)

下一篇: Oracle 学习之性能优化(九)使用hint

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》