cudarray icon indicating copy to clipboard operation
cudarray copied to clipboard

python setup.py install error

Open cxfneo opened this issue 10 years ago • 8 comments

python setup.py install error in cudarray setup command: CUDA back-end wants to be able to remove cudarray.cudarray_wrap, but the distribution doesn't contain any packages or modules under cudarray.cudarray_wrap

How to solve, thank you very much

cxfneo avatar May 15 '15 02:05 cxfneo

I update the setup.py. Now another problem is : “”running build_ext building 'cudarray.numpy_backend.nnet.conv_bc01' extension gcc -std=gnu99 -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/python2.7 -c cudarray/numpy_backend/nnet/conv_bc01.c -o build/temp.linux-x86_64-2.7/cudarray/numpy_backend/nnet/conv_bc01.o gcc: cudarray/numpy_backend/nnet/conv_bc01.c: No such file or directory “” I am not familiar with cpython and I indeed could not find cudarray/numpy_backend/nnet/conv_bc01.c. Is the conv_bc01.c generated by compling the code at the first step "make"?

The version of cython is 0.22 Python version: 2.7

cxfneo avatar May 15 '15 06:05 cxfneo

conv_bc01.c gets generated by the call to cythonize().

Regarding your initial problem: You might need to call sudo python setup.py install because you are trying to install to system directories. Alternatively, you could perform a user install.

andersbll avatar May 15 '15 09:05 andersbll

Thanks for your quick reply, I will try your method. If I want to code my own c++ cuda function for some special cases, how can I embed the c++ cuda function into python routine, Need I to learn cython first? could u give quick guide?

thank you

cxfneo avatar May 15 '15 13:05 cxfneo

You need to 1) implement your CUDA functionality, 2) wrap the functionality in Cython and 3) expose it to Python using cudarray.ndarray objects.

andersbll avatar May 15 '15 13:05 andersbll

thank u

cxfneo avatar May 16 '15 01:05 cxfneo

Hi andersbll sorry to bother you again, I try to install it today again, but another problem is " Traceback (most recent call last): File "setup.py", line 5, in import numpy File "/usr/local/lib/python2.7/site-packages/numpy/init.py", line 153, in from . import add_newdocs File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "/usr/local/lib/python2.7/site-packages/numpy/lib/init.py", line 18, in from .polynomial import * File "/usr/local/lib/python2.7/site-packages/numpy/lib/polynomial.py", line 19, in from numpy.linalg import eigvals, lstsq, inv File "/usr/local/lib/python2.7/site-packages/numpy/linalg/init.py", line 50, in from .linalg import * File "/usr/local/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 29, in from numpy.linalg import lapack_lite, _umath_linalg ImportError: libmkl_rt.so: cannot open shared object file: No such file or directory " PS: The numpy(1.8) used on my machine was complied with MKL and it worked. I also set the enviroment var path for MKL LIB.

cxfneo avatar May 18 '15 07:05 cxfneo

Sorry, can't help you with that.

andersbll avatar May 18 '15 09:05 andersbll

OK, thank you all the same. By the way, does cudarray support selection as follows:" row_select_index=[0,2,3,10,0],gp_A is a garray with a shape(M,N) gp_A[row_select_index] ?

cxfneo avatar May 18 '15 11:05 cxfneo