无法在Win7上安装Cython [英] Cannot install Cython on win7

查看:144
本文介绍了无法在Win7上安装Cython的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我尝试在ta-lib上使用Cython,并且使用了mrjbq7提供的包装器(非常感谢。)。因此,我尝试在计算机上安装Cython-0.19.1,然后在ta-lib-master(包装器)上进行 python setup.py install ,我得到了以下内容:

So I'm trying to use Cython on ta-lib, and I'm using the wrapper provided by mrjbq7 (many thanks..). So I tried to install Cython-0.19.1 on my computer and then do python setup.py install on ta-lib-master (the wrapper), and I got the following:

    running install
    running build
    running build_py
    running biuld_ext
    failed to import Cython: No module named 'Actions'
    error: Cython does not appear to be installed

我尝试使用 python setup.py build_ext --inplace

构建Cython有人可以帮助我吗?非常感谢!

Can anyone please help me? Thanks a lot!

我正在使用32位Windows7和python 3.3.1

I'm using 32-bit Windows7 and python 3.3.1

推荐答案

我认为您的麻烦与您正在安装 TA-lib包装器无关。 code>,所以这里有一些建议:

I don't think your troubles have anything to do with the fact that you're installing the TA-lib wrapper, so here are a few suggestions :


  • 首先,尝试使用 Python 2.7重新安装Cython .X (我怀疑某些Python版本与Cython版本之间存在不兼容性:至少,您提到的那种错误使我想起了什么……)。

  • First, retry to install Cython using Python 2.7.X (I suspect some incompatibilities between some Python versions and Cython versions : at least, the kind of errors you mentioned remind me something...).

如果这样做没有帮助,请按以下说明重建Cython

If this doesn't help, rebuild Cython as follows :


  1. 通过此处

  2. 告诉 disutils 使用gcc ...创建文件 C:\Python27\Lib\distutils\distutils.cfg 并编写

  1. Install MinGW (with options gcc/g++) from here.
  2. Tell disutils to use gcc... Create file C:\Python27\Lib\distutils\distutils.cfg and write this inside :

[build]
compiler = mingw32


  • 如果需要,从文件<$ c中删除所有 -mno-cygwin gcc选项的实例$ c> C:\Python27\Lib\distutils\cygwinccompiler.py

  • If needed, remove all instances of -mno-cygwin gcc option from file C:\Python27\Lib\distutils\cygwinccompiler.py :

    # self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
                         # compiler_so='gcc -mno-cygwin -mdll -O -Wall',
                         # compiler_cxx='g++ -mno-cygwin -O -Wall',
                         # linker_exe='gcc -mno-cygwin',
                         # linker_so='%s -mno-cygwin %s %s'
                                    # % (self.linker_dll, shared_option,
                                       # entry_point))
    # becomes :
    
    self.set_executables(compiler='gcc -O -Wall',
                         compiler_so='gcc -mdll -O -Wall',
                         compiler_cxx='g++ -O -Wall',
                         linker_exe='gcc',
                         linker_so='%s %s %s'
                                    % (self.linker_dll, shared_option,
                                       entry_point))
    
    # Just because `-mno-cygwin` has just been removed from early versions of gcc.
    


  • 构建并安装Cython: $ python setup.py install

    在任何情况下:请确保使用适当的 PATH 表示Cython:

    In any cases : Make sure to have the proper PATHs for Cython :

    SET PYTHONPATH=%PYTHONPATH%;../../../DEPENDENCIES/Cython-0.19.1
    SET PATH=%PATH%;../../../DEPENDENCIES/Cython-0.19.1/bin
    

    尝试重建TA-lib,请告诉我它说的是什么;-)

    Try rebuilt TA-lib and please tell me what it says ;-)

    这篇关于无法在Win7上安装Cython的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆