Can't install Cython on win7

So, I am trying to use Cython on ta-lib, and I am using the shell provided by mrjbq7 (thank you very much ..). So I tried installing Cython-0.19.1 on my computer, and then python setup.py install on ta-lib-master (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 

I tried building Cython using python setup.py build_ext --inplace

Can anybody help me? Thank you very much!


I am using 32-bit Windows7 and python 3.3.1

+4
source share
1 answer

I don’t think your problems are with installing TA-lib wrapper , so here are some tips:

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

If this does not help, rebuild Cython as follows:

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

     [build] compiler = mingw32 
  • If necessary, remove all instances of the -mno-cygwin gcc option from the 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. 
  • Build and install Cython: $ python setup.py install

Anyway: Make sure Cython has the correct PATH :

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

Try to restore TA-lib and please tell me what it says :-)

+4
source

Source: https://habr.com/ru/post/1484943/


All Articles