在Windows下,似乎具有C依赖性的easy_install不是很容易。
尝试1 – vcvarsall.bat错误
我使用cython在Windows7下安装MinGw ; 我修改了Windows7的PATH以包含C:MinGwbin 。 在这一点上,我试图easy_install -U cython ,并得到了…
C:Usersmike_penningtonDesktopTestDrive>easy_install -U cython Searching for cython Reading http://pypi.python.org/simple/cython/ Reading http://www.cython.org Reading http://cython.org Best match: Cython 0.15.1 Downloading http://cython.org/release/Cython-0.15.1.zip Processing Cython-0.15.1.zip Running Cython-0.15.1setup.py -q bdist_egg --dist-dir c:usersmike_p~1appdata localtempeasy_install-qr1tetCython-0.15.1egg-dist-tmp-556kzq Compiling module Cython.Plex.Scanners ... Compiling module Cython.Compiler.Scanning ... Compiling module Cython.Compiler.Parsing ... Compiling module Cython.Compiler.Visitor ... Compiling module Cython.Compiler.Code ... Compiling module Cython.Runtime.refnanny ... warning: no files found matching 'bugs.txt' under directory 'tests' error: Setup script exited with error: Unable to find vcvarsall.bat C:Usersmike_penningtonDesktopTestDrive>
尝试2 – 修复vcvarsall.bat错误
接下来,按照我发现的博客的build议,我也尝试把它放在C:Python27Libdistutilsdistutils.cfg以修复vcvarsall.bat错误。
[build] compiler=mingw32
这只能略微帮助…
C:Python27LibdisTUT~1>easy_install -U cython Searching for cython Reading http://pypi.python.org/simple/cython/ Reading http://www.cython.org Reading http://cython.org Best match: Cython 0.15.1 Downloading http://cython.org/release/Cython-0.15.1.zip Processing Cython-0.15.1.zip Running Cython-0.15.1setup.py -q bdist_egg --dist-dir c:usersmike_p~1appdata localtempeasy_install-kfif_oCython-0.15.1egg-dist-tmp-o1tbkp Compiling module Cython.Plex.Scanners ... Compiling module Cython.Compiler.Scanning ... Compiling module Cython.Compiler.Parsing ... Compiling module Cython.Compiler.Visitor ... Compiling module Cython.Compiler.Code ... Compiling module Cython.Runtime.refnanny ... warning: no files found matching 'bugs.txt' under directory 'tests' cc1.exe: error: unrecognized command line option '-mno-cygwin' error: Setup script exited with error: command 'gcc' Failed with exit status 1 C:Python27LibdisTUT~1>
警告 – 没有cygwin或预编译的二进制文件
我意识到,我可能能够在cygwin下工作。 不过,我不希望cygwin依赖这个库; 我需要本地的Windows7输出。
如果可能的话,我想避免预编译的Cython二进制文件,因为正如作者所说,它们“不受支持,仅用于testing”。
题
我怎样才能得到cython安装在Windows7下使用MinGw easy_install ?
经过更多的Google搜索之后,我找到了一些指导,建议从C:Python27Libdistutilscygwinccompiler.py删除-mno-cygwin ,因为有一个distutils错误 。
从C:Python27Libdistutilscygwinccompiler.py删除-mno-cygwin得到了cython编译。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。