Install Chainer & cupy without CUDA on OSX 10.11.6
See original GitHub issueHow can I install Chainer and cupy without CUDA on OS X 10.11.6?
I’m running on an old (2009) MacBookPro with an old GPU GeForce 9400 which only supports CUDA 1.1.
When I installed chainer it complained that cupy was not installed.
$ python -m chainer validate
Traceback (most recent call last):
File "/Users/davidlaxer/anaconda/lib/python2.7/runpy.py", line 163, in _run_module_as_main
mod_name, _Error)
File "/Users/davidlaxer/anaconda/lib/python2.7/runpy.py", line 111, in _get_module_details
__import__(mod_name) # Do not catch exceptions initializing package
File "chainer/__init__.py", line 26, in <module>
from chainer import training # NOQA
File "chainer/training/__init__.py", line 7, in <module>
from chainer.training import updaters # NOQA
File "chainer/training/updaters/__init__.py", line 1, in <module>
from chainer.training.updaters import multiprocess_parallel_updater # NOQA
File "chainer/training/updaters/multiprocess_parallel_updater.py", line 12, in <module>
from cupy.cuda import nccl
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/cupy/__init__.py", line 16, in <module>
raise six.reraise(RuntimeError, RuntimeError(msg), sys.exc_info()[2])
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/cupy/__init__.py", line 8, in <module>
from cupy import core
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/cupy/core/__init__.py", line 1, in <module>
from cupy.core import core
RuntimeError: CuPy is not correctly installed. Please check your environment, uninstall Chainer and reinstall it with `pip install chainer --no-cache-dir -vvvv`.
I also tried to install a newer version of CUDA (e.g. 6.5, 7.0, 7.5, 8.0)
...
gcc -fno-strict-aliasing -I/Users/davidlaxer/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_GLIBCXX_USE_CXX11_ABI=0 -D_FORCE_INLINES=1 -I/Developer/NVIDIA/CUDA-7.5/include -I/Users/davidlaxer/anaconda/include/python2.7 -c cupy/cuda/thrust.cpp -o build/temp.macosx-10.7-x86_64-2.7/cupy/cuda/thrust.o
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/nj/nphdkhyj6s1dttb0pd9zb2wc0000gn/T/pip-build-dzkUib/cupy/setup.py", line 102, in <module>
'sdist': sdist},
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "cupy_setup_build.py", line 554, in run
build_ext.build_ext.run(self)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/command/build_ext.py", line 75, in run
_build_ext.run(self)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/build_ext.py", line 499, in build_extension
depends=ext.depends)
File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "cupy_setup_build.py", line 447, in _compile
base_opts = build.get_compiler_base_options()
File "install/build.py", line 153, in get_compiler_base_options
_compiler_base_options = _get_compiler_base_options()
File "install/build.py", line 191, in _get_compiler_base_options
stderrdata.decode('utf8'))
RuntimeError: Encountered unknown error while testing nvcc:
nvcc fatal : The version ('50000') of the host compiler ('clang') is not supported
----------------------------------------
Command "/Users/davidlaxer/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/nj/nphdkhyj6s1dttb0pd9zb2wc0000gn/T/pip-build-dzkUib/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 /var/folders/nj/nphdkhyj6s1dttb0pd9zb2wc0000gn/T/pip-1RDzQM-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/nj/nphdkhyj6s1dttb0pd9zb2wc0000gn/T/pip-build-dzkUib/cupy/
clang:
$ clang --version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Users/davidlaxer/anaconda/bin
nvcc:
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Mon_Apr_11_13:23:40_CDT_2016
Cuda compilation tools, release 7.5, V7.5.26
xcode:
Version 8.2.1 (8C1002)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Installation — Chainer 7.8.1 documentation
In order to enable CUDA support, you have to install CuPy manually. If you also want to use cuDNN, you have to install...
Read more >Installation — CuPy 11.4.0 documentation
Installing CuPy from Conda-Forge# ... and conda will install a pre-built CuPy binary package for you, along with the CUDA runtime libraries (...
Read more >Install cupy on MacOS without GPU support
There is no Mac support in CuPy since NVIDIA no longer supports MacOS. Whatever you read is outdated. I know because I sent...
Read more >Install Chainer
2.1 Install CUDA; 2.2 Install cudnn; 2.3 Install cupy; 2.4 Reinstall chainer, cupy. 3 C: Multiple GPUs within 1 PC. 3.1 Install NCCL....
Read more >AnnualReportNo19.pdf
10 Gbit ネットワークや不揮発性メモリ(Non-Volatile Memory: NVM)のような高速 ... 浮動小数点数に対する排他的な fetch-and-add が必要で, CUDA ではそれを用いて.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
excuse-me for the question, I have a doubt : can cupy work without Cuda ? (relying on numpy or numpy-mkl only)
Good to hear that! In the era of Chainer 1.x,
cupy
was a part ofchainer
package.