I'm trying to wrap a c++ code into python using cython. my .py code for this is
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules=cythonize("helloworld.pyx"),
)
however while compling it with
python setup.py build_ext --inplace
I get an error
running build_ext
building 'helloworld' extension
Traceback (most recent call last):
File "setup.py", line 4, in <module>
ext_modules=cythonize("helloworld.pyx"),
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
I am working on visual studio 2010. I am kind of aware this error is because of vcvars6.bat but I don"t know how to fix it. please help