Regarding the title, C ++, which is my favorite language because I am free, and Python, which suddenly emerged and became 2 recommendations. I wanted to make it work together, so when I looked it up, there was a tutorial on Microsoft's official page. It is a record executed accordingly.
I want to record the points that are particularly clogged with a hard copy.
Microsoft official page Creating C ++ Extensions for Python With reference to
The latest (as of April 30, 2020) 64-bit version of Python was already installed on my PC. I used to go without reading the tutorial, but this was the point I was addicted to. You can rest assured that you can install the 32-bit version using the Visual Studio installer.
However, it seems that you can check where it was installed with the registry editor. Computer \ HKEY_LOCAL_MACHINE \ SOFTWARE \ Python \ PythonCore \ 3.7 \ PythonPath
In my case C: \ Program Files (x86) \ Microsoft Visual Studio \ Shared \ Python37_64 was. This is an environment variable PYTHONPATH Pass through.
It seems that it needs to be python3.6, which was not good even above.
https://www.python.org/downloads/release/python-361/ Install from and set the above environment path
You can see the overwhelming speed improvement. However, I don't think there will be an opportunity to create a process for speed at this level. The Python library is abundant, so it's unlikely to be used in practice (personally)
Recommended Posts