为什么在安装simplejson时得到“C扩展无法编译”?

顺便说一句,我使用Windows,所以我必须安装Visual Studio?

(py) D:\python>pip install simplejson Downloading/unpacking simplejson Downloading simplejson-2.6.2.tar.gz (53kB): 53kB downloaded Running setup.py egg_info for package simplejson Installing collected packages: simplejson Running setup.py install for simplejson building 'simplejson._speedups' extension *************************************************************************** 

警告:C扩展名无法编译,加速未启用。

  Failure information, if any, is above. I'm retrying the build without the C extension now. *************************************************************************** *************************************************************************** WARNING: The C extension could not be compiled, speedups are not enabled. Plain-Python installation succeeded. *************************************************************************** Successfully installed simplejson Cleaning up... 

为了能够在Windows上编译Python C扩展模块,您需要安装正确版本的Visual Studio。 请参阅在Windows上构建C和C ++扩展 。

这是因为simplejson显然包含了一些C扩展代码来抵消一些处理,这提高了速度和效率,但是这个人对于不能编译python代码的c扩展的机器提供了一个纯python替代方案。 与SQLAlchemy和hiredis等其他模块一样