1

我想使用 python Copperhead 进行 CUDA C++ 原型设计,这需要 MSVC++14,我想在没有 CUDA 的情况下首先让 Copperhead 工作。我已经安装了 Microsoft Build Tools 2015 并尝试从https://pypi.org/project/copperhead/生成 hello world 示例,但我收到如下所示的错误消息。如果可能,我不想安装 Visual Studio。

我安装了 MS Build Tools 2015 (build 14.0.23107.10),我不确定这是否是我应该安装的...我通过 python 3.7.2 上的 pip 安装了铜头。

import copperhead as cpp

hello_world_cpp = '''
#include <iostream>
void hello_world()
{
   std::cout << "Hello World!" << std::endl;
}'''

hello_world = cpp.generate('hello_world', 'void()', hello_world_cpp)

hello_world()
running install
running bdist_egg
running egg_info
writing hello_world.egg-info\PKG-INFO
writing dependency_links to hello_world.egg-info\dependency_links.txt
writing top-level names to hello_world.egg-info\top_level.txt
reading manifest file 'hello_world.egg-info\SOURCES.txt'
writing manifest file 'hello_world.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
building 'hello_world' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
4

0 回答 0