0

I pretty new in Python programming and I try to run some DCGAN Training scripts https://github.com/ml5js/training-dcgan

After creating my environment with conda and build all the dependencies , I stil have a problem when I run the py program:

RuntimeError: CUDA environment is not correctly set up
(see https://github.com/chainer/chainer#installation).CuPy is not correctly installed.

If you are using wheel distribution (cupy-cudaXX), make sure that the version of CuPy you installed matches with the version of CUDA on your host.
Also, confirm that only one CuPy package is installed:
  $ pip freeze

If you are building CuPy from source, please check your environment, uninstall CuPy and reinstall it with:
  $ pip install cupy --no-cache-dir -vvvv

Check the Installation Guide for details:
  https://docs-cupy.chainer.org/en/latest/install.html

original error: cannot import name 'core' from 'cupy.core' (C:\Users\keyvane\anaconda3\lib\site-packages\cupy\core\__init__.py)
> c:\users\keyvane\anaconda3\lib\site-packages\chainer\backends\cuda.py(93)check_cuda_available()
-> raise RuntimeError(msg)

I tried several times to reinstall the whole environment properly, but I still have the same error. maybe someone has an idea how to fix this ? Any help will be marvelous :) Here is my config:

Windows 10  / Python 3.6 (64bits)
absl-py==0.7.1
astor==0.8.1
astunparse==1.6.3
blinker==1.4
cachetools==4.1.0
certifi==2020.4.5.1
cffi==1.14.0
chainer==6.2.0
chardet==3.0.4
click==7.1.2
cryptography==2.9.2
cupy==6.0.0
cupy-cuda100==6.2.0
fastrlock==0.5
filelock==3.0.12
gast==0.2.2
google-auth==1.16.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.29.0
h5py==2.10.0
idna==2.9
importlib-metadata==1.6.1
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
Markdown==3.2.2
mkl-fft==1.0.15
mkl-random==1.1.1
mkl-service==2.3.0
numpy==1.18.1
oauthlib==3.1.0
olefile==0.46
opt-einsum==3.2.1
Pillow==7.1.2
protobuf==3.12.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.20
PyJWT==1.7.1
pyOpenSSL==19.1.0
pyreadline==2.1
PySocks==1.7.1
PyYAML==5.3.1
requests==2.23.0
requests-oauthlib==1.3.0
rsa==4.0
scipy==1.4.1
six==1.14.0
tensorboard==2.2.1
tensorboard-plugin-wit==1.6.0.post3
tensorflow==2.1.0
tensorflow-cpu==2.2.0
tensorflow-estimator==2.1.0
tensorflow-gpu==2.0.0
tensorflow-hub==0.5.0
tensorflowjs==1.2.6
termcolor==1.1.0
typing==3.6.6
typing-extensions==3.6.6
urllib3==1.25.9
Werkzeug==1.0.1
win-inet-pton==1.1.0
wincertstore==0.2
wrapt==1.12.1
zipp==3.1.0

Thank you a lot !

talonmies
  • 70,661
  • 34
  • 192
  • 269
Bizarrr
  • 1
  • 1
  • Do you have a CUDA capable GPU? Have you installed the CUDA toolkit? Have you verified your CUDA install using the instructions in [the CUDA windows install guide](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html)? It looks like your particular `cupy` variant is expecting CUDA 10.0, but I'm not 100% certain of that. If it is expecting CUDA 10.0, and you have some other CUDA version installed, that probably won't work. – Robert Crovella Jun 06 '20 at 22:39
  • Hi Robert,thank you for your reply :) Yes, Ichecked and I have a Geforce GTX960M, and I ve download and installed properly CUDA 10 with the whole toolkit ... so I cannot understand what's wrong with this error :S – Bizarrr Jun 07 '20 at 18:07

1 Answers1

1

Do you have multiple versions of CUDA installed (should be able to tell by typing "uninstall" into windows search bar and looking). It looks like you have a few different versions of tensorflow installed so i'm assuming you likely also have a few versions of CUDA too. If that is the case i'm going to take a guess in the dark and say when you run the code for whatever reason it is trying to use a different version of CUDA than the one you want. So if my guess is right just try uninstalling the wrong versions of CUDA assuming you don't want them.

If you do want multiple versions of CUDA there is likely some way to call specific version of tensorflow (maybe cuda) in the code you are using.

If my guess is wrong i have no idea

Will Mulcahey
  • 89
  • 1
  • 7