LoginSignup
1
1

More than 5 years have passed since last update.

Kerasがscipyのせいでインストールできないとき[Windows]

Posted at

環境

  • Windows 10 64bit
  • AnacondaによるPython環境

内容

  • kerasをインストールしようとして以下のようなエラーがでたときの対応方法
    • 自動でscipyがインストールされるはずが失敗
>pip install -U keras

(中略)
Collecting theano (from keras)
Collecting scipy>=0.14 (from theano->keras)
  Using cached scipy-0.19.1.tar.gz
Requirement already up-to-date: numpy>=1.9.1 in c:\users\(ユーザ名)\anaconda3\envs\tensorflow\lib\site-packages (from theano->keras)
Building wheels for collected packages: scipy
  Running setup.py bdist_wheel for scipy ... error
(中略)
    ----------------------------------------
Command "C:\Users\(ユーザ名)\Anaconda3\envs\tensorflow\python.exe -u -c "import setuptools, tokenize;__file__='r:\\temp\\user\\pip-build-0eij39zu\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record r:\temp\user\pip-7tr0bkup-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in r:\temp\user\pip-build-0eij39zu\scipy\

対応方法

  • conda の機能を利用してscipyをインストールする
    • コマンドプロンプトは管理者権限で実行のこと
: condaの機能でscipyをインストール
conda install scipy
: そのあとでkeras/tensorflowをインストール
pip install keras
pip install tensorflow

1
1
0

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
1
1