Stiefel
Stiefel

Reputation: 2793

Why do I get ModuleNotFoundError for import cupy?

I installed cupy using pip install cupy-cuda90. The installation went successfully (after installing MSVC 2017) and pip list shows cupy-cuda90.

When I type import cupy I get the following error:

Traceback (most recent call last):

File "<ipython-input-1-329ec5cf1bc8>", line 1, in <module>
import cupy

ModuleNotFoundError: No module named 'cupy'

I am on Windows 10 (1607), CUDA 9.0 is installed, and CUDA_PATH & CUDA_PATH_V9_0 point to the right directory.

Upvotes: 2

Views: 2456

Answers (1)

Stiefel
Stiefel

Reputation: 2793

Problem solved.

Eventhough I was starting pip from a specific win python installation, there was another python interpreter installed, which was set in the PATH environment variable. So pip.exe simply used the other python interpreter and installed CuPy there.

Upvotes: 2

Related Questions