When I try to build a minimal Cython file test.pyx with Python 3.3 (Anaconda 3) under windows 7, I obtain a strange error:
C:\Users\myname\Test_cython>python setup.py build
running build
running build_ext
error: [WinError 2] The system cannot find the file specified
Of course test.pyx is in the working directory. It works fine under windows with Python 2.7 (Anaconda) and under Linux with Python 2 and 3.
What could be the problem here with Python 3.3 (Anaconda 3)?
Thanks
The file setup.py:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
name = 'test',
cmdclass = {"build_ext": build_ext},
ext_modules = [Extension('test', ['test.pyx'])]
)
Solution:
I found that the line 404 of the file cygwinccompiler.py of the package disutils
out_string = check_output(['gcc', '-dumpmachine'])
has to be changed as
out_string = check_output(['gcc', '-dumpmachine'], shell=True)
Then, it compiles normally.
The line 404 of the file cygwinccompiler.py of the package disutils
out_string = check_output(['gcc', '-dumpmachine'])
has to be changed as
out_string = check_output(['gcc', '-dumpmachine'], shell=True)
Then, it compiles normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With