繁体   English   中英

如何在mac os x(10.9)上的python中安装libgpuarray和clBLAS?

[英]How to install libgpuarray and clBLAS in python on mac os x (10.9)?

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

使用CMake UI我在生成构建时收到以下警告:

未为以下目标指定MACOSX_RPATH:

gpuarray(分别为clBLAS)

执行'python setup.py build'会导致以下错误:

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

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

'#warning'使用已弃用的NumPy API,将其禁用为“\\
^
pygpu / gpuarray.c:354:10:致命错误:找不到'gpuarray / types.h'文件
'#include“gpuarray / types.h”

试图弄清楚如何设置正确的路径,但说实话,我很遗憾。

任何帮助都非常感谢!

安装了最新的XCode(包括DeveloperTools)。 python.org的Python版本是2.7,并且在以下路径下(Terminal $ type -a python)

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

我通过运行解决了这个问题

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

代替:

python setup.py build

这解决了它。 您可以将这些添加到PATH作为替代方案。

此外,对于将来使用Google搜索的人,您可能需要将Build / src / CMakeFiles / gpuarray.dir中的link.txt修改为:

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

在您创建的Build /目录中运行make之后。

我想你忘了跑

make
make install

在cmake之后。

我通过以下命令安装它:

mkdir build && cd build

cmake ..

make && make install

cd .. && python setup.py install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM