Skip to content

Import fails although CUDA is present #3403

@daniel1v

Description

@daniel1v

In Python <3.8 it is possible to use the cupy-cudaXXX inside a conda environment in combination with cudatoolkit from anaconda repositories. The cuda binaries are installed into the conda environment and no CUDA_PATH has to be set.

Under Python 3.8 the following lines make the import fail, although CUDA is present:

cupy/cupy/__init__.py

Lines 11 to 12 in 1654d38

if sys.platform.startswith('win32') and (3, 8) <= sys.version_info: # NOQA
_environment._setup_win32_dll_directory() # NOQA

Uncommenting these lines make the import work again and cupy works also as expected. So my question: Is it really necessary to enforce users to set the CUDA_PATH variable? And wouldn't it be better to explicitely check if the needed dll is present rather than the environment variable?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions