I was looking for ways to interface C++/Qt projects with Python when I decided I might start learning Cython code. I found this article from Pycharm's website, saying that the free version does have basic Cython support. I followed the guide up to the part above the sentence "Once the build task successfully completes, the .so file is created." as the compiler gives an error:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
This problem has been mentioned on multiple stack overflow thread. The problem is that I can only use my work PC and I do not have admin rights. An answer has been giving an answer which I did not get where they got the tools from: https://stackoverflow.com/a/47794180/14729172
Is it possible to get a detailed answer from how to find a work-around (without admin rights) to install the tool (Microsoft Visual C++ Build Tools/Microsoft Visual C++ 14.0), or another tool that allows to run Cython.
I am using latest Pycharm on Python 3.10 on a company Windows 10.
Edit
I tried the possibility of using mingw to use Cython. I use mingw's Python 3.9.12. I used this tutorial (not Pycharm's tutorial anymore). I created the following file example.pyx:
from libc.math cimport pow
cdef double square_and_add (double x):
return pow(x, 2.0) + x
cpdef print_result (double x):
print("Test")
In setup.py:
from Cython.Build import cythonize
from distutils.core import setup, Extension
ext = Extension(name="hello", sources=["example.pyx"])
setup(ext_modules=cythonize(ext))
And finally ran:
python setup.py build_ext --inplace --compiler=mingw32
It generated a example.c and a hello.cp39-mingw_x86_64.pyd; which is the expected behavior.