我在 boost 根文件夹中使用以下命令构建了带有 boost 的 libtorrent:
bootstrap.bat
b2 --hash cxxstd=14 release
在我将BOOST_ROOT和BOOST_BUILD_PATH添加到PATH变量之后。
我还下载了 OpenSSL 并构建它,然后分别复制到Visual Studio 15 2017编译器包含和 libs 文件夹。
接下来在 libtorrent 根文件夹中,我运行了以下命令:
b2 variant=release link=shared
b2 install --prefix=build
构建成功并创建了 libtorrent c++ 库。
之后我运行了这些命令:
py setup.py build
py setup.py install
他们执行时没有错误,并且 libtorrent 安装在我的 python libs/site-packages文件夹中。但是当我导入它时,这个错误显示:
Python 导入错误 [ ]
我可能做错了什么构建步骤?
操作系统:Windows 10 x64
蟒蛇:3.9.5 x64
Libtorrent:2.0.5
提升:1.78.0
我遵循了 libtorrent 文档: https ://libtorrent.org/building.html 和 https://www.libtorrent.org/python_binding.html