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.

How to compile and install cupy on Windows 10 x64

See original GitHub issue

When I use pip to install cupy on windows 10, the following error reported, I am pretty sure that cupy 1.0.3 can install on windows.

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:
    **************************************************
    *** WARNING: Cannot find nvToolsExt. nvtx was disabled.
    **************************************************
    Options: {'profile': False, 'linetrace': False, 'annotate': False, 'no_cuda': False}
    Include directories: ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\include']
    Library directories: ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\bin', 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\lib\\x64']
    Unable to find a compatible Visual Studio installation.
    **************************************************
    *** WARNING: Include files not found: ['cublas_v2.h', 'cuda.h', 'cuda_profiler_api.h', 'cuda_runtime.h', 'curand.h', 'cusparse.h', 'nvrtc.h']
    *** WARNING: Skip installing cuda support
    *** WARNING: Check your CFLAGS environment variable
    **************************************************
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\machen\AppData\Local\Temp\pip-build-po8si2ni\cupy\setup.py", line 32, in <module>
        ext_modules = cupy_setup_build.get_ext_modules()
      File "C:\Users\machen\AppData\Local\Temp\pip-build-po8si2ni\cupy\cupy_setup_build.py", line 378, in get_ext_modules
        extensions = make_extensions(arg_options, compiler, use_cython)
      File "C:\Users\machen\AppData\Local\Temp\pip-build-po8si2ni\cupy\cupy_setup_build.py", line 268, 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\machen\AppData\Local\Temp\pip-build-po8si2ni\cupy\

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
kmaehashicommented, Jul 18, 2018

We now provide wheels of development releases for Windows. Try pip install cupy-cuda92 etc. as in the installation docs.

2reactions
j2lcommented, Mar 19, 2018

I tried:

PS E:\Anaconda3python\Scripts> .\pip install .\fastrlock-0.3-cp36-cp36m-win_amd64.whl
Processing e:\anaconda3python\scripts\fastrlock-0.3-cp36-cp36m-win_amd64.whl
Installing collected packages: fastrlock
Successfully installed fastrlock-0.3

then

PS E:\Anaconda3python\Scripts> .\pip install .\cupy-4.0.0b3-cp36-cp36m-win_amd64.whl
Processing e:\anaconda3python\scripts\cupy-4.0.0b3-cp36-cp36m-win_amd64.whl
Requirement already satisfied: numpy>=1.9.0 in e:\anaconda3python\lib\site-packages (from cupy==4.0.0b3)
Requirement already satisfied: six>=1.9.0 in e:\anaconda3python\lib\site-packages (from cupy==4.0.0b3)
Requirement already satisfied: fastrlock>=0.3 in e:\anaconda3python\lib\site-packages (from cupy==4.0.0b3)
Installing collected packages: cupy
Successfully installed cupy-4.0.0b3

and it worked for me (Win10 x64). Thanks @hknerdgn

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation — CuPy 11.4.0 documentation
To build CuPy from source, set the CUPY_INSTALL_USE_HIP , ROCM_HOME , and HCC_AMDGPU_TARGET environment variables. ( HCC_AMDGPU_TARGET is the ISA name supported ...
Read more >
Installation Guide — CuPy 5.4.0 documentation
Recommended Environments · Requirements. Optional Libraries · Install CuPy · Install CuPy from Source. Using pip; Using Tarball · Uninstall CuPy · Upgrade...
Read more >
Installation Guide — CuPy 1.0.3 documentation
CuPy uses C++ compiler such as g++. You need to install it before installing CuPy. This is typical installation method for each platform:....
Read more >
latest PDF - CuPy Documentation
CuPy is a NumPy/SciPy-compatible array library for GPU-accelerated computing with Python. CuPy acts as a drop-in replacement to run existing NumPy/SciPy ...
Read more >
CuPy: NumPy & SciPy for GPU
Easy to install. The easiest way to install CuPy is to use pip. CuPy provides wheels (precompiled binary packages) for Linux and Windows....
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