Skip to content Skip to sidebar Skip to footer

Using Boost Numpy With Visual Studio 2019 And Python 3.8

I want to use Boost Numpy (boost version 1.72) with Visual Studio 2017 and Python 3.8. In my test program which includes I get a link error 'boost_numpy38-vc141-mt-gd-x32-1_72.lib'

Solution 1:

Building Boost using the boostrap + .\b2 method will check to make sure that you have numpy installed before building boost_numpy. Make sure that you have numpy installed (python -m pip install numpy).

On my machine, the exact command used by b2 to check if numpy is installed is:

python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"

You can check the command on your own machine by adding --debug-configuration to the .\b2 command, but it should be the same.

Numpy must be installed for whichever version of Python is used for the above command.

Solution 2:

Tnx Layne, that was indeed the clue!!

In addition some other clues: - run 'bootstrap vc141' if you have multiple VS installation and you want to use 2017 - run 'b2.exe --build-type=complete' to get both static and dynamic libraries

Once everything is build you will need boost_numpy38-vc141-mt-gd-x32-1_72.dll and boost_python38-vc141-mt-gd-x32-1_72.dll to run your program

Post a Comment for "Using Boost Numpy With Visual Studio 2019 And Python 3.8"