NVIDIA / FastPhotoStyle

Style transfer, deep learning, feature transform
Other
11.11k stars 1.2k forks source link

Can't install cupy #88

Closed f1am3d closed 3 years ago

f1am3d commented 4 years ago

Command:

pip install cupy

Result:

ERROR: Complete output from command python setup.py egg_info:
    ERROR: Options: {'package_name': 'cupy', 'long_description': None, 'wheel_libs': [], 'wheel_includes': [], '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.0\\include', 'C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\include']
      Library directories: ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\bin', 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\lib\\x64', 'C:\\Program Files\\NVIDIA Corporation\\NvToolsExt\\lib\\x64']
      nvcc command       : ['C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\bin/nvcc.exe']

    Environment Variables:
      CFLAGS          : (none)
      LDFLAGS         : (none)
      LIBRARY_PATH    : (none)
      CUDA_PATH       : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0
      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\FLAMES~1\AppData\Local\Temp\pip-install-ghow8_pv\cupy\setup.py", line 120, in <module>
        ext_modules = cupy_setup_build.get_ext_modules()
      File "C:\Users\FLAMES~1\AppData\Local\Temp\pip-install-ghow8_pv\cupy\cupy_setup_build.py", line 632, in get_ext_modules
        extensions = make_extensions(arg_options, compiler, use_cython)
      File "C:\Users\FLAMES~1\AppData\Local\Temp\pip-install-ghow8_pv\cupy\cupy_setup_build.py", line 387, in make_extensions
        raise Exception('Your CUDA environment is invalid. '
    Exception: Your CUDA environment is invalid. Please check above error log.
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\FLAMES~1\AppData\Local\Temp\pip-install-ghow8_pv\cupy\
hikmet-demir commented 4 years ago

not sure you are still having this error but in case you are having, run nvidia-smi you should see which cuda version you have in here NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 for me it's 10.1 after learning the cuda version go to cupy installation page here

and install the correct cupy with same cuda version for me it's pip install cupy-cuda101

this should work, in case it's not working comment here.

f1am3d commented 4 years ago

@hikmet-demir Wow, it's been a while... But I'll try to do something.

TanmayKhot commented 3 years ago

My cuda version is NVIDIA-SMI 450.119.03 Driver Version: 450.119.03 CUDA Version: 11.0 I followed the steps suggested by @hikmet-demir but I got this error - "ImportError: CuPy is not installed correctly." However, pip install cupy --no-cache-dir -vvvv worked for me.