theano.test()因nvcc错误而失败 - nvcc致命:不知道如何处理' NPY_NO_DEPRECATED_API = NPY_1_7_API_VERSION,-fPIC'

时间:2016-08-10 18:18:44

标签: theano theano-cuda

我将Theano安装到Ananconda环境中,似乎遇到了一个我不明白的安装问题。创建环境后,我运行theano.test()并得到以下错误:

ERROR:theano.sandbox.cuda:Failed to compile cuda_ndarray.cu: ('nvcc return status', 1, 'for cmd', 'nvcc -shared -O3 -m64 -Xcompiler -DCUDA_NDARRAY_CUH=m11b90075e2397c684f9dc0f7276eab8f,-D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC -Xlinker -rpath,/home/brad/.theano/compiledir_Linux-4.4--generic-x86_64-with-debian-stretch-sid-x86_64-3.5.2-64/cuda_ndarray -I/home/brad/anaconda3/envs/theano1/lib/python3.5/site-packages/theano/sandbox/cuda -I/home/brad/anaconda3/envs/theano1/lib/python3.5/site-packages/numpy/core/include -I/home/brad/anaconda3/envs/theano1/include/python3.5m -o /home/brad/.theano/compiledir_Linux-4.4--generic-x86_64-with-debian-stretch-sid-x86_64-3.5.2-64/cuda_ndarray/cuda_ndarray.so mod.cu -L/home/brad/anaconda3/envs/theano1/lib -lpython3.5m -lcublas -lcudart')

如果我从命令行运行引用的nvcc命令,我得到:

nvcc fatal   : Don't know what to do with 'NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC'

CUDA安装似乎正在运行。 我可以编译并运行所有CUDA示例,运行deviceQuery并成功进行带宽测试。 我在Anaconda环境内部或外部使用python 2.7或3.5获得相同的错误。 除了nvcc错误之外,Theano.test(0)似乎运行正常。(仍在运行) 仅使用theano.test()触发错误,但如果我还导入Keras并从keras.models导入'导入顺序'

我注意到有很多未解决的Theano安装问题,但希望这个问题不是我独有的。我没有用Google搜索解决方案。

Ubuntu 16.04,Anaconda Python 3.5.2(或2.7),CUDA 7.5.17,

decorator                 4.0.10                   py35_0  
ipykernel                 4.3.1                    py35_0  
ipython                   5.0.0                    py35_0  
ipython_genutils          0.1.0                    py35_0  
jupyter_client            4.3.0                    py35_0  
jupyter_core              4.1.0                    py35_0  
libgfortran               3.0.0                         1  
libsodium                 1.0.10                        0  
mkl                       11.3.3                        0  
nose                      1.3.7                    py35_1  
numpy                     1.10.4                   py35_2  
openssl                   1.0.2h                        1  
path.py                   8.2.1                    py35_0  
pexpect                   4.0.1                    py35_0  
pickleshare               0.7.3                    py35_0  
pip                       8.1.2                    py35_0  
prompt_toolkit            1.0.3                    py35_0  
ptyprocess                0.5.1                    py35_0  
pygments                  2.1.3                    py35_0  
python                    3.5.2                         0  
pyzmq                     15.3.0                   py35_0  
readline                  6.2                           2  
scipy                     0.17.1              np110py35_1  
setuptools                25.1.6                   py35_0  
simplegeneric             0.8.1                    py35_1  
six                       1.10.0                   py35_0  
sqlite                    3.13.0                        0  
theano                    0.7.0               np110py35_0  
tk                        8.5.18                        0  
tornado                   4.4.1                    py35_0  
traitlets                 4.2.2                    py35_0  
wcwidth                   0.1.7                    py35_0  
wheel                     0.29.0                   py35_0  
xz                        5.2.2                         0  
zeromq                    4.1.4                         0  
zlib                      1.2.8                         3 

0 个答案:

没有答案
相关问题