LoginSignup
2

More than 5 years have passed since last update.

CUDA環境の構築について

Posted at

ご質問失礼いたします。

昨日人工知能の計算においてGPUを利用したく思いダウンロード等を行ったのですが上手くいかなく困っております。ご助力いただけますと幸いでございます。

[環境]
Windows10/Chainer(2.1.0)/Anaconda5.0.1(python3.6)/CUDA9.0/Visual Studio2017
テキストエディタAtomにCODEを記述し、コマンドプロンプトで起動したいです。

python train_mnist.py -g 0
※Githubから拝借したGPUが作動しているか確認するためのpyファイルです。
https://github.com/chainer/chainer/blob/master/examples/mnist/train_mnist.py

しかしながら以下のエラーをはいてしまいました。

RuntimeError: CUDA environment is not correctly set up
(see https://github.com/chainer/chainer#installation). No module named 'cupy'

以下がそれに対し試行錯誤した記録です。

(1)chainerのuninstallおよびinstall -> 変化なし
(2)cupyのinstall ※以下がエラー内容です

Exception: Traceback (most recent call last):
File "F:\artificial_intelligence\python\lib\site-packages\pip\compat_init.py", line 73, in console_to_str
return s.decode(sys.
stdout_.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 19: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
(中略)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 19: invalid start byte

(3)UnicodeDecodeErrorが原因かと思い以下サイトを参考に文字CODEをUTF-8に変更 -> 変化なし
https://groups.google.com/forum/#!topic/chainer-jp/76eRJTMUQX0

参考になるかわかりませんが、Visual Studioを起動し新規プロジェクトを開くとNVIDIAよりCUDA9.0でプロジェクトを新規作成できるようになっているのでCUDAのダウンロード自体はうまくいったのかと思っております。

ご助力いただけますと幸いでございます。
何卒よろしくお願いいたします。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2