Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install Chainer & cupy without CUDA on OSX 10.11.6

See original GitHub issue

How 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/", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/Users/davidlaxer/anaconda/lib/python2.7/", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "chainer/", line 26, in <module>
    from chainer import training  # NOQA
  File "chainer/training/", line 7, in <module>
    from import updaters  # NOQA
  File "chainer/training/updaters/", line 1, in <module>
    from import multiprocess_parallel_updater  # NOQA
  File "chainer/training/updaters/", line 12, in <module>
    from cupy.cuda import nccl
  File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/cupy/", line 16, in <module>
    raise six.reraise(RuntimeError, RuntimeError(msg), sys.exc_info()[2])
  File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/cupy/", line 8, in <module>
    from cupy import core
  File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/cupy/core/", 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/", line 102, in <module>
        'sdist': sdist},
      File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 151, in setup
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 953, in run_commands
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 972, in run_command
      File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/command/", line 61, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/", line 563, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 326, in run_command
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 972, in run_command
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/", line 127, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 326, in run_command
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 972, in run_command
      File "", line 554, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/command/", line 75, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/Cython/Distutils/", line 185, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/", line 340, in run
      File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/Cython/Distutils/", line 193, in build_extensions
      File "/Users/davidlaxer/anaconda/lib/python2.7/site-packages/setuptools/command/", line 196, in build_extension
        _build_ext.build_extension(self, ext)
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/command/", line 499, in build_extension
      File "/Users/davidlaxer/anaconda/lib/python2.7/distutils/", line 574, in compile
        self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
      File "", line 447, in _compile
        base_opts = build.get_compiler_base_options()
      File "install/", line 153, in get_compiler_base_options
        _compiler_base_options = _get_compiler_base_options()
      File "install/", line 191, in _get_compiler_base_options
    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/';f=getattr(tokenize, 'open', open)(__file__);'\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 --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 --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


Version 8.2.1 (8C1002)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

stonebigcommented, Feb 26, 2018

excuse-me for the question, I have a doubt : can cupy work without Cuda ? (relying on numpy or numpy-mkl only)

kmaehashicommented, Dec 19, 2017

Good to hear that! In the era of Chainer 1.x, cupy was a part of chainer package.

Read more comments on GitHub >

github_iconTop 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 >
10 Gbit ネットワークや不揮発性メモリ(Non-Volatile Memory: NVM)のような高速 ... 浮動小数点数に対する排他的な fetch-and-add が必要で, CUDA ではそれを用いて.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found