I solved the problem myself. This is a link to my answer: https://stackoverflow.com/questions/44161857/the-dll-created-by-boost-python-cannot-be-imported-following-boost-pythons-qui/44194094#44194094

On Thu, May 25, 2017 at 12:54 AM, Heng Zhou <hzhou3@clemson.edu> wrote:
I followed the steps in the QuickStart of Boost.Python here: http://www.boost.org/doc/libs/1_49_0/libs/python/doc/tutorial/doc/html/index.html. I can successfully compile, link and get the output dll file, but I always got and error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named hello_ext

when trying to import it in python. This is my environment:

- Windows 7 Enterprise SP1 64 bit, I am the Administrator and run cmd as Administrator.
- Python 2.7.13 64 bit
- Visual Studio 2015 (v14.0) Update 3
- In VS2015, the project name is ConsoleApplication1, so the output is ConsoleApplication1.dll.
- I built the simple sample code under x64 configuration in VS2015 and I verified with dumpbin that the output ConsoleApplication1.dll is really 64 bit.

I tried the following but got the same error:
- I added the search path to the ConsoleApplication1.dll into sys.path
- I changed the name of ConsoleApplication1.dll to hello_ext.dll

The QuickStart says "The resulting DLL is now visible to Python." but that magic does not take place on my machine. Could you please tell me what I had missed or, if I built the DLL properly, how to import it in python command line? Thanks a lot.