《转》win7 安装ujson 出现的“error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27”
2023-09-14 08:57:48 时间
本文转载自http://blog.csdn.net/Tilyp/article/details/72842800?locationNum=2&fps=1
我的python环境是
D:\workspace\scrapy-cluster-master>python
Python 2.7.13 |Anaconda 4.3.1 (64-bit)| (default, Dec 19 2016, 13:29:36) [MSC v.
1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import sys
>>> sys.version
'2.7.13 |Anaconda 4.3.1 (64-bit)| (default, Dec 19 2016, 13:29:36) [MSC v.1500 6
4 bit (AMD64)]'
>>>
我用pip安装其他python包没有任何问题,在安装ujson时却出现了
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
但是我在自己的电脑上装过Visual C++ 2008 (9.0),按道理不应该出现这个错误,后来在一篇博客中看到只装vs2008还不行,还得安装一个Micorsoft Visual C++ Compiler for Python 2.7的包,下载安装之后在装ujson没有问题了。
出错的原因是ujson是c++编译的,需要c++的环境。
这里看到一张python版本需要对应的c++ 版本(注:MSC v.XXXX就是python版本号,可通过sys.version查看)
MSC v.1000 -> Visual C++ 4.x
MSC v.1100 -> Visual C++ 5
MSC v.1200 -> Visual C++ 6
MSC v.1300 -> Visual C++ .NET
MSC v.1310 -> Visual C++ .NET 2003
MSC v.1400 -> Visual C++ 2005 (8.0)
MSC v.1500 -> Visual C++ 2008 (9.0)
MSC v.1600 -> Visual C++ 2010 (10.0)
MSC v.1700 -> Visual C++ 2012 (11.0)
MSC v.1800 -> Visual C++ 2013 (12.0)
MSC v.1900 -> Visual C++ 2015 (14.0)
MSC v.1910 -> Visual C++ 2017 (15.0)
参考:
1, http://www.cnblogs.com/ldm1989/p/4210743.html
2, https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
相关文章
- 延时摄影Lapse It Time Lapse Pro v2.4
- IT项目后评价为何如此重要
- 疫情之下,IT部门该如何为企业创造更多价值?
- HINT: It seems you set a fixed date / time / datetime value as default for this field. This may not
- ORA-26924: cannot configure string using “string”.”string” queue because it is used by “string” for string purpose ORACLE 报错 故障修复 远程处理
- 掌握Linux RHCE,释放IT技术力量(linuxrhce)
- Linux虚拟机:构建虚拟IT世界的核心技术(linux虚拟机是什么)
- 刘遄Linux培训视频:开启你的IT之旅(刘遄linux培训视频)
- Oracle 数据库——让IT运行更加高效(oracle)
- 学习Linux命令,开启IT之路(linux命令是基础)
- Oracle数据库培训提升IT技能创造价值(it oracle 培训)
- 使用Oracle OSW构建企业级动态IT环境(oracle osw)
- 李彦宏、马化腾、沈向洋三巨头对话人工智能的应用和未来 | 2017 IT领袖峰会