运行easy_install Cython时出错:
C:\Users\Hp>cd C:\Python27\Scripts
C:\Python27\Scripts>easy_install Cython
Searching for Cython
Reading http://pypi.python.org/simple/Cython/
Best match: Cython 0.19.1
Downloading https://pypi.python.org/packages/source/C/Cython/Cython-0.19.1.zip
d5=991e7887140b3e962ef65e9c05a8694d
Processing Cython-0.19.1.zip
Running Cython-0.19.1\setup.py -q bdist_egg --dist-dir c:\users\hp\appdata\loc
\temp\easy_install-jfquni\Cython-0.19.1\egg-dist-tmp-yxdubl
Compiling module Cython.Plex.Scanners ...
Compiling module Cython.Plex.Actions ...
Compiling module Cython.Compiler.Lexicon ...
Compiling module Cython.Compiler.Scanning ...
Compiling module Cython.Compiler.Parsing ...
Compiling module Cython.Compiler.Visitor ...
Compiling module Cython.Compiler.FlowControl ...
Compiling module Cython.Compiler.Code ...
Compiling module Cython.Runtime.refnanny ...
warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Test
warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Test
warning: no files found matching '*.h' under directory 'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
error: Setup script exited with error: Unable to find vcvarsall.bat我得到这个错误,显然一些dev文件是必需的,我不确定如何获得它的windows?
发布于 2015-03-18 06:15:30
我在vcvarsall.bat上也遇到了同样的问题,我在Windows8和Python3.4上解决这个问题的步骤是:
关于Cython的安装,有两种选择:从第一步开始,或者直接跳到第二步:
第一步
不使用pip安装Cython:
我从这里下载了我的版本的.whl:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#cython
然后我安装了.whl,执行以下操作:
pip install filename.whl这样,cython就不会抱怨vcvarshall.bat了。
现在您已经安装了Cython,多亏了这一点,您将能够创建c代码,但是它会给.pyd的创建带来问题,并且一旦您开始编译代码,它将显示与缺少vcvarshall.bat之前相同的错误。这就是为什么第二步需要它的原因。
第二步
创建文件distutils.cfg并写入:
C:\MinGW\bin
当你尝试调用cython时,它可能仍然会给你一个错误:
zlib1.dll was not foundhttp://sourceforge.net/projects/libpng/files/zlib/1.2.3/zlib123-dll.zip/download?use_mirror=iweb&download=
中
现在Cython应该可以正常工作了。
此外,我在一些帖子中看到一些建议,说解决方案是安装MVS 2008,但它被弃用,所以我不推荐这个选项。
这个解决方案是我找到的多个答案的组合,我一直在尝试,直到我得到正确的解决方案,我附上了链接,以防你想看看其他解决方案或观点:
发布于 2016-11-04 23:13:13
我的病毒检查工具刚刚将refnanny.pyd标记为病毒并将其清除。显然,它触发了某种启发式匹配。
https://stackoverflow.com/questions/19113861
复制相似问题