在Visual Studio 2019和Python 3.8中使用Boost Numpy [英] Using boost numpy with visual studio 2019 and python 3.8

查看:154
本文介绍了在Visual Studio 2019和Python 3.8中使用Boost Numpy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Visual Studio 2017和Python 3.8中使用Boost Numpy(增强版1.72).在包括我的测试程序中,我得到一个链接错误"boost_numpy38-vc141-mt-gd-x32-1_72.lib".我在任何地方都找不到文件"boost_numpy38-vc141-mt-gd-x32-1_72.lib",在构建二进制文件(引导程序+.\ b2)时未创建该文件,并且在Sourceforge的二进制存储库中找不到该文件( https://sourceforge.net/projects/boost/files/boost-binaries/).

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". I cannot find the file "boost_numpy38-vc141-mt-gd-x32-1_72.lib" anywhere, it is not created when building the binaries (bootstrap + .\b2) and it is nowhere to be found on the binary repositories at Sourceforge (https://sourceforge.net/projects/boost/files/boost-binaries/ ).

有人知道吗?

推荐答案

使用boostrap +.\ b2方法构建Boost会检查以确保在构建boost_numpy之前已安装了numpy.确保已安装numpy( python -m pip install numpy ).

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).

在我的机器上,b2用于检查是否已安装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())"

您可以通过在.\ b2命令中添加-debug-configuration 来在自己的计算机上检查该命令,但这应该是相同的.

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

对于上述命令使用的任何Python版本,都必须安装Numpy.

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

这篇关于在Visual Studio 2019和Python 3.8中使用Boost Numpy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆