I made a .py
file called "hello.py"
which has the following imports:
from setuptools import setup,Extension
from Cython.Build import cythonize
setup( name = 'increment app',ext_modules = cythonize("hello.pyx"))
While running this I am getting an:
AttributeError :'module' object has no attribute 'locals'.
I am working with Visual Studio C++ 2008
version.
Command prompt pip install cython
gave me no error but it didn't download or install cython either .
@DavidW Here is the full traceback ---
AttributeErrorTraceback (most recent call last)
C:\SPB_Data\setup.py in <module>()
1 from setuptools import setup,Extension
----> 2 from Cython.Build import cythonize
3 setup( name = 'increment app',ext_modules = cythonize("hello.pyx"))
C:\Users\kalachand\AppData\Local\Enthought\Canopy32\edm\envs\User\lib\site-packages\Cython\Build\__init__.py in <module>()
----> 1 from .Dependencies import cythonize
2 from .Distutils import build_ext
C:\Users\kalachand\AppData\Local\Enthought\Canopy32\edm\envs\User\lib\site-packages\Cython\Build\Dependencies.py in <module>()
176
177
--> 178 @cython.locals(start=cython.Py_ssize_t, end=cython.Py_ssize_t)
179 def line_iter(source):
180 if isinstance(source, basestring):
AttributeError: 'module' object has no attribute 'locals'