2017-05-07 13 views
1

Windows 10にニューラルネットワークを構築するために、theanoをバックエンドとして使用しています。私のpythonバージョンは2.7です。問題は、私がケラスを試してみると、私はパスエラーが出てくることです。Kerasがインストールされていますが動作していません

$python 
>>import keras 

は私が私のシステム変数パスに追加する必要があることを伝えることができます(少なくとも私はそう思う...)しかし、関係なく、私が追加私がまだ取得していない

Problem occurred during compilation with the command line below: 
"g++" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Python27\lib\site-packages\numpy\core\include" -I"C:\Python27\include" -I"C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\gof" -L"C:\Python27\libs" -L"C:\Python27" -o C:\Users\Patrick\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_61_Stepping_4_GenuineIntel-2.7.11-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\Patrick\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_61_Stepping_4_GenuineIntel-2.7.11-64\lazylinker_ext\mod.cpp -lpython27 
The system cannot find the path specified. 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\Python27\lib\site-packages\keras-2.0.3-py2.7.egg\keras\__init__.py", line 3, in <module> 
    from . import activations 
    File "C:\Python27\lib\site-packages\keras-2.0.3-py2.7.egg\keras\activations.py", line 4, in <module> 
    from . import backend as K 
    File "C:\Python27\lib\site-packages\keras-2.0.3-py2.7.egg\keras\backend\__init__.py", line 70, in <module> 
    from .theano_backend import * 
    File "C:\Python27\lib\site-packages\keras-2.0.3-py2.7.egg\keras\backend\theano_backend.py", line 3, in <module> 
    import theano 
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\__init__.py", line 66, in <module> 
    from theano.compile import (
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\compile\__init__.py", line 10, in <module> 
    from theano.compile.function_module import * 
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\compile\function_module.py", line 21, in <module> 
    import theano.compile.mode 
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\compile\mode.py", line 10, in <module> 
    import theano.gof.vm 
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\gof\vm.py", line 662, in <module> 
    from . import lazylinker_c 
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\gof\lazylinker_c.py", line 127, in <module> 
    preargs=args) 
    File "C:\Python27\lib\site-packages\theano-0.9.0-py2.7.egg\theano\gof\cmodule.py", line 2316, in compile_str 
    (status, compile_stderr.replace('\n', '. '))) 
. ception: Compilation failed (return status=1): The system cannot find the path specified. 
>>> 

私にエラーを与えますエラー。私は追加しようとしました

C:\Python27\lib 
C:\Python27\lib\site-packages 

基本的には、指定されたパスは指定できませんでした。注意すべき点は、scipyをインストールするのに苦労していて、.whlファイルをhttp://www.lfd.uci.edu/~gohlke/pythonlibs/#scipyから入手しなければならないかどうかは分かりません。まあ私の問題です。

+0

おそらくg ++を見つけることができません。インストールされていますか? PATHのパスですか? –

+0

g ++がインストールされていない場合は、MinGWを試してみてください - 私はここに見つかりました:https://nuwen.net/mingw.html –

答えて

0

私も同じ問題に直面しており、他のpythonのバージョンを削除することで解決しました。 1つのpythonだけがインストールされていることを確認してください。複数ある場合は、うまく動作しないことがあります。

関連する問題