如何为python Copperhead设置MSVC ++ 14.0构建工具?

时间:2019-06-13 09:04:54

标签: python cuda msvc14

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

我安装了MS Build Tools 2015(内部版本14.0.23107.10),我不确定这是否应该安装... 我在python 3.7.2上通过pip安装了Copperhead。

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/

0 个答案:

没有答案