question-mark
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.

Cannot install cupy on win10

See original GitHub issue

Hi! I’m running into some problems trying to install cupy on windows.

When I try the pip install cupy-cuda101, I get:

Collecting cupy-cuda101
  Could not find a version that satisfies the requirement cupy-cuda101 (from versions: )
No matching distribution found for cupy-cuda101

When I try pip install cupy, I get:

Collecting cupy
  Using cached https://files.pythonhosted.org/packages/cd/d6/532e5da87f3b513cd0b98bcbf9a58fb6758598039944c42cb93d13b71a5f/cupy-5.4.0.tar.gz
    Complete output from command python setup.py egg_info:
    Options: {'package_name': 'cupy', 'long_description': None, 'wheel_libs': [], 'no_rpath': False, 'profile': False, 'linetrace': False, 'annotate': False, 'no_cuda': False}

    -------- Configuring Module: cuda --------
    Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    ************************************************************
    * CuPy Configuration Summary                               *
    ************************************************************

    Build Environment:
      Include directories: ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\include', 'C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\include']
      Library directories: ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin', 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\lib\\x64', 'C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\lib\\x64']
      nvcc command       : ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin/nvcc.exe']

    Environment Variables:
      CFLAGS          : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include
      LDFLAGS         : (none)
      LIBRARY_PATH    : (none)
      CUDA_PATH       : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
      NVTOOLSEXT_PATH : C:\Program Files\NVIDIA Corporation\NvToolsExt\
      NVCC            : (none)

    Modules:
      cuda      : No
        -> Include files not found: ['cublas_v2.h', 'cuda.h', 'cuda_profiler_api.h', 'cuda_runtime.h', 'cufft.h', 'curand.h', 'cusparse.h', 'nvrtc.h']
        -> Check your CFLAGS environment variable.

    ERROR: CUDA could not be found on your system.
    Please refer to the Installation Guide for details:
    https://docs-cupy.chainer.org/en/stable/install.html

    ************************************************************

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\danie\AppData\Local\Temp\pip-install-djalcd87\cupy\setup.py", line 120, in <module>
        ext_modules = cupy_setup_build.get_ext_modules()
      File "C:\Users\danie\AppData\Local\Temp\pip-install-djalcd87\cupy\cupy_setup_build.py", line 588, in get_ext_modules
        extensions = make_extensions(arg_options, compiler, use_cython)
      File "C:\Users\danie\AppData\Local\Temp\pip-install-djalcd87\cupy\cupy_setup_build.py", line 384, in make_extensions
        raise Exception('Your CUDA environment is invalid. '
    Exception: Your CUDA environment is invalid. Please check above error log.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\danie\AppData\Local\Temp\pip-install-djalcd87\cupy\

Note: The environment variable CFLAGS was manually set by me to the directory of the missing .h files, but it did not solve the problem (it showed “none” before I set it).

I’m on Windows 10, using Python 3.7.3. I have installed CUDA toolkit 10.1

Best regards, Daniel

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
Europium-152commented, Apr 12, 2019

Sorry for the late answer and thank you for the feedback. I had two issues that I hadn’t realized. I first tried with python2 which didn’t work, then I realized I had to do it in python 3, but by mistake, I installed the 32-bit version (that’s when I got the message I posted above). When I finally changed to python 3 64-bit everything worked great. And yes visual studio is required.

0reactions
2541989802commented, Sep 23, 2021

This solves my problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to compile and install cupy on Windows 10 x64 #914
C:\WINDOWS\system32>pip install cupy Collecting cupy Using cached cupy-2.3.0.tar.gz Complete output from command python setup.py egg_info: ...
Read more >
Trouble while installing cupy on Windows 10 with pip
I want to install CuPy but I get this error. I have MX150 Graphics card which supports CUDA. I have installed the CUDA...
Read more >
Installation — CuPy 11.4.0 documentation
See Reinstalling CuPy for details. You can install the latest stable release version of the CuPy source package via pip .
Read more >
Setting up the development environment for Chainer with ...
6. Chainer & cupy · Open Windows Power Shell by right clicking the start button (or Command Prompt if using Windows 7). ·...
Read more >
[Example code]-I cannot install cupy with pip
I have attached the error message because I have no idea where to start with it. I have tried updating setuptools and purging...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found