Jun-03-2019, 08:26 PM
(This post was last modified: Jun-03-2019, 08:26 PM by goldenmean.)
I am learning to use Cython from here
I have a setup.py file as below:
python setup.py build_ext --inplace
Whether I use distutils or setuptools in the setup.py file above, both give errors as below.
Error seen, If I use distutils
If I use setuptools, below is the error
How can i point to this *.bat and resolve these errors if i use distutils OR
How can i fix the errors: "Microsoft Visual C++ 14.0 is required", if any different installation needed?
Can someone please give inputs?
NOTE: I have tried setting set VS90COMNTOOLS=%VS120COMNTOOLS% but no success, same error of vcvarsall.bat . I have also added C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC to my windows PATH variable, but no success.
I have a setup.py file as below:
#from distutils.core import setup from setuptools import setup, find_packages, Extension, Command from Cython.Build import cythonize setup( ext_modules = cythonize("cyt_hello_world.pyx") )And a simple print as below in file cyt_hello_world.pyx
print("Cython Hello World!")I compile this cython extension on a Windows host using below command
python setup.py build_ext --inplace
Whether I use distutils or setuptools in the setup.py file above, both give errors as below.
Error seen, If I use distutils
Quote:F:\PythonCode>python setup.py build_ext --inplace running build_ext building 'cyt_hello_world' extension
error: Unable to find vcvarsall.bat
If I use setuptools, below is the error
Quote:F:\PythonCode>python setup.py build_ext --inplace running build_ext building 'cyt_hello_world' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
I have Microsoft Visual Studio installed at path : C:\Program Files (x86)\Microsoft Visual Studio 12.0
I can see file vcvarsall.bat in MSVisual Studio 12.0 installation folder C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
How can i point to this *.bat and resolve these errors if i use distutils OR
How can i fix the errors: "Microsoft Visual C++ 14.0 is required", if any different installation needed?
Can someone please give inputs?
NOTE: I have tried setting set VS90COMNTOOLS=%VS120COMNTOOLS% but no success, same error of vcvarsall.bat . I have also added C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC to my windows PATH variable, but no success.