【问题标题】:Cython: Update to 0.20Cython:更新到 0.20
【发布时间】:2014-01-24 07:55:50
【问题描述】:

我通过pip install --upgrade cython 将 cython 升级到了 0.20。在它工作正常之前。然后我无法编译了。然后我尝试卸载重新安装,得到了这个Unable to find vcvarsall.bat 错误,安装 cython 0.19 时不存在...想想看,0.19 是用 python(x, y) 安装的。

C:\>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw32-xy/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.e
xe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)
C:\>ver

Microsoft Windows [Version 6.1.7601]
C:\>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win
32

我按照here 的说明进行操作,但运气不佳。有任何想法吗?我可以提供更多信息吗?

【问题讨论】:

标签: python-2.7 pip cython mingw32


【解决方案1】:

好吧,我使用来自 here 的预构建版本来完成这项工作,这是由 tom pohl here 推荐的

【讨论】:

    【解决方案2】:

    在这种情况下,pip 尝试使用 Visual Studio 编译器编译 cython(因此出现 vcvarsall.bat 错误)。要使用 Visual Studio 编译器为 Python 2.7(32 位)编译扩展,您需要安装 Visual C++ 2008 Express

    但如果有一天你发现你想从源代码构建cython,那么请查看"How to use MinGW's gcc compiler when installing Python package using Pip?"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-18
      • 2023-02-22
      相关资源
      最近更新 更多