Fail to install cupy with Anaconda

494 views
Skip to first unread message

nhc.bkp...@gmail.com

unread,
Oct 5, 2017, 8:41:52 AM10/5/17
to Chainer User Group
 Hi,

I can install chainer but can not install cupy using anaconda (python, pip).

I've also checked this.

Python 3.6.2 |Anaconda, Inc.| (default, Sep 30 2017, 18:42:57)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import chainer
>>> chainer.cuda.available
False
>>>

 
Here is the error message when installing cupy.

"
.....
 creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/cupy
    creating build/temp.linux-x86_64-3.6/cupy/core
    gcc -pthread -B /home/yugi/anaconda3/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -D_FORCE_INLINES=1 -I/usr/local/cuda-8.0/include -I/home/yugi/anaconda3/include/python3.6m -c cupy/core/core.cpp -o build/temp.linux-x86_64-3.6/cupy/core/core.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    cupy/core/core.cpp: In function ‘std::vector<long unsigned int> __pyx_convert_vector_from_py_size_t(PyObject*)’:
    cupy/core/core.cpp:84432:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_v_item); if (unlikely(__pyx_t_5 == -1L && PyErr_Occurred())) __PYX_ERR(5, 52, __pyx_L1_error)
                                                                                 ^
    cupy/core/core.cpp:665:43: note: in definition of macro ‘unlikely’
       #define unlikely(x) __builtin_expect(!!(x), 0)
                                               ^
    g++ -pthread -shared -B /home/yugi/anaconda3/compiler_compat -L/home/yugi/anaconda3/lib -Wl,-rpath=/home/yugi/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.6/cupy/core/core.o -L/usr/local/cuda-8.0/lib64 -L/home/yugi/anaconda3/lib -R/usr/local/cuda-8.0/lib64 -lcublas -lcuda -lcudart -lcurand -lnvToolsExt -lpython3.6m -o build/lib.linux-x86_64-3.6/cupy/core/core.cpython-36m-x86_64-linux-gnu.so
    g++: error: unrecognized command line option ‘-R’
    error: command 'g++' failed with exit status 1
   
    ----------------------------------------
Command "/home/yugi/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yzpa8bkg/cupy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jz4ovrfi-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yzpa8bkg/cupy/

"

Many thanks.

vin...@preferred.jp

unread,
Oct 5, 2017, 9:36:51 AM10/5/17
to Chainer User Group
Hi

This does not really fix the problem but if you are not dependent on Python 3.6.2 and just want to install cupy, a workaround is to switch to an older version such as 3.6.1.

Regards,

Vincent

2017年10月5日木曜日 21時41分52秒 UTC+9 nhc.bkp...@gmail.com:
Reply all
Reply to author
Forward
0 new messages