如何在macosx(10.9)上用python安装libgpuarray和clBLAS?

2024-06-28 20:53:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在OSX10.9上为python安装libgpuarray(http://deeplearning.net/software/libgpuarray/installation.html)。我安装了cmake3.0并正在使用UI。我从git下载了libgpuarray和clBLAS源代码,并在Users/user/libgpuarray下解压。。/分别是clBLAS。在

使用CMake UI生成生成生成时,我收到以下警告:

MACOSX_RPATH is not specified for the following targets:

gpuarray (clBLAS respectively)

执行“python”设置.py“生成”将导致以下错误:

/Users/i043337/Library/Python/2.7/lib/python/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning:

 "Using deprecated NumPy API, disable it by "          "#defining  
 NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]  

'#warning "Using deprecated NumPy API, disable it by " \
^
pygpu/gpuarray.c:354:10: fatal error: 'gpuarray/types.h' file not found
'#include "gpuarray/types.h"

我想弄清楚怎么走正确的路,但说实话我迷路了。在

任何帮助都是非常感谢的!在

安装了最新的XCode(包括DeveloperTools)。Python版本为2.7python.org网站在以下路径下(终端$type-a python)

python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /usr/bin/python
python is /usr/local/bin/python


Tags: numpyapiuibinincludeislibrarynot
3条回答

我通过跑步解决了这个问题:

python setup.py build_ext -I /usr/local/include -L /usr/local/lib

而不是:

^{pr2}$

这就解决了。你可以把这些添加到你的路径中作为替代。在

另外,对于将来在google上搜索此内容的人,您可能需要修改链接.txt内部生成/src/CMakeFiles/gpuarray.dir文件收件人:

1) omit -arch=i386
2) add -F/Library/Frameworks

在Build/目录中运行make之后,它会让您创建。在

我通过以下命令安装了它:

mkdir build && cd build

cmake ..

make && make install

cd .. && python setup.py install

我想你忘了跑了

make
make install

在cmake之后。在

相关问题 更多 >