I've been trying to do this for 4 hours and it's pissing me off to no end. I'll describe what the issues are.
Cython is a Python package that allows python code to be compiled into C code so it can run faster.
To clarify, I am using Windows 7.
- I got Cython 0.20.1 (released 2014-02-11) from cython.org and unpacked it
- I ran setup.py through IDLE and it put a bunch of other stuff in my Cython-0.20.1 folder (separate from the Python27 folder)
- Added C:\python27;C:\MinGW\bin;C:\Cython-0.20.1 to PATH
- I put a hello world program in my Cython folder and ran those from import statements and got:
Then I get to this step.
I enter that into windows cmd and it does recognize python's interpreter because when I type python by itself it runs the interpreter in Python27. Then I get
So now I have a .pyx file and a .c file for helloworld, but I can't get a .dll like what the documentation says (Windows).
Edit: Even worse, I don't even think it's set up properly, yet I have the cythonize stuff in the package.
Edit 2: Now I'm getting gcc errors on ld
Cython is a Python package that allows python code to be compiled into C code so it can run faster.
To clarify, I am using Windows 7.
- I got Cython 0.20.1 (released 2014-02-11) from cython.org and unpacked it
- I ran setup.py through IDLE and it put a bunch of other stuff in my Cython-0.20.1 folder (separate from the Python27 folder)
- Added C:\python27;C:\MinGW\bin;C:\Cython-0.20.1 to PATH
- I put a hello world program in my Cython folder and ran those from import statements and got:
Code:
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import os
>>> os.chdir( 'c:/Cython-0.20.1' )
>>> from distutils.core import setup
>>> from Cython.Build import cythonize
>>> setup(
ext_modules = cythonize("helloworld.pyx")
)
Compiling helloworld.pyx because it changed.
Cythonizing helloworld.pyx
Code:
python setup.py build_ext --inplace
Code:
> python setup.py build_ext --inplace python: can't open file 'setup.py': [Errno 2] No such file or directory
Edit: Even worse, I don't even think it's set up properly, yet I have the cythonize stuff in the package.
Edit 2: Now I'm getting gcc errors on ld
Code:
collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1