2015-11-24 16 views
19

私はwindows8/anaconda spyder(2.7)でpythonを使用します。 私はTheanoを最新のものに更新しようとしています。私がtheanoをインストールすると、Numpyインストールエラーです。 (Mingw32CCompilerインスタンスに 'compile_options'属性がありません)

"pip install --upgrade theano" 

numpyのインストール部分でエラーが発生します。

numpyはanaconda GUIで使用できますが、アナコンダ端末には表示されません。 (ピップショーnumpyのは、何も出力しない)

は、エラーが以下のようなものです(私はnumpyのをインストールしようとすると、同じエラーが発生した)

File "c:\users\user\appdata\local\temp\pip_build_user\numpy\numpy\distutils\command\build_src.py", line 329, in build_extension_sources 

    sources = self.generate_sources(sources, ext) 

    File "c:\users\user\appdata\local\temp\pip_build_user\numpy\numpy\distutils\command\build_src.py", line 386, in generate_sources 

    source = func(extension, build_dir) 

    File "numpy\core\setup.py", line 455, in generate_config_h 

    rep = check_long_double_representation(config_cmd) 

    File "numpy\core\setup_common.py", line 191, in check_long_double_representation 

    cmd.compiler.compile_options.remove("/GL") 

AttributeError: Mingw32CCompiler instance has no attribute 'compile_options' 

---------------------------------------- 
Cleaning up... 
    Removing temporary dir c:\users\user\appdata\local\temp\pip_build_user... 
Command C:\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\local\\temp\\pip_build_user\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user\appdata\local\temp\pip-nm4fpu-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\user\appdata\local\temp\pip_build_user\numpy 
Exception information: 
Traceback (most recent call last): 
    File "C:\Anaconda\lib\site-packages\pip\basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "C:\Anaconda\lib\site-packages\pip\commands\install.py", line 283, in run 
    requirement_set.install(install_options, global_options, root=options.root_path) 
    File "C:\Anaconda\lib\site-packages\pip\req.py", line 1435, in install 
    requirement.install(install_options, global_options, *args, **kwargs) 
    File "C:\Anaconda\lib\site-packages\pip\req.py", line 706, in install 
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) 
    File "C:\Anaconda\lib\site-packages\pip\util.py", line 697, in call_subprocess 
    % (command_desc, proc.returncode, cwd)) 
InstallationError: Command C:\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata\\local\\temp\\pip_build_user\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\user\appdata\local\temp\pip-nm4fpu-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\user\appdata\local\temp\pip_build_user\numpy 
+0

あなたは 'conda update conda'、' conda update --all'、 'conda install libpython mingw'を実行しましたか?独自のMinGWバージョン(TDM-GCCなど)をインストールしましたか?その場合は、Anacondaのインストールと同じビット数ですか(64ビットAnacondaには64ビットTDM-GCCが必要です)。 'PATH'環境変数を共有できますか? –

答えて

4

これが最も可能性が高いnumpyの問題です。残念ながら私が提案する修正後もtheanoをアップグレードすることはできませんでしたが、​​のようなステップバイステップガイドを実行すると動作する可能性があります。 が偽を返すので、この特定の問題が発生します。 this discussionthe source も参照してください。私は手動でシステム変数MSYSTEMMINGW32に設定することに決めましたが、これは私のシステムでは定義されておらず、他の動作を破る可能性はほとんどありません。

これは、アップグレードが機能しないことや、副作用がないことを保証するものではありませんが、ここで述べた問題を解決します。

関連する問題