python - 为什么我在安装 simplejson 时得到 "C extension could not be compiled"?

标签 python windows visual-studio python-extensions

顺便说一句,我使用的是 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。参见 Building C and C++ Extensions on Windows .

关于python - 为什么我在安装 simplejson 时得到 "C extension could not be compiled"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12554230/

相关文章:

visual-studio - 是否有 Visual Studio 工具来显示程序集的对象模型?

c# - "No overload takes 2 arguments"但 IntelliSense 显示带有 2 个参数的过载

python - Python y(n_samples, n_targets) 中高斯过程回归的实现

c++ - 与遗留 TCHAR 代码接口(interface)的正确样式

python - 通过 C API 创建新的 numpy 标量并实现自定义 View

windows - Firefox 4 Windows 仅 "bug"和 :after/:before CSS selectors?

c# - Windows Mobile 6.5 手势和 C# 2.0 应用程序

python - 意外标记 'not' 仅在同一行中发生

python - 有没有办法使字典值等同于 python 中的 set 元素?

python - 比较2种颜色直方图,其中一种是从txt文件加载的