web-dev-qa-db-ja.com

condaを使用している場合、g ++は使用できません: `conda install m2w64-toolchain`

これらのチュートリアルを実行している間、 ニューラルネット 、test.pyファイルを実行すると、これらの例外と警告が表示されます。以前の提案を試しましたが、何も機能しませんでした。

WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
  warnings.warn("DeprecationWarning: there is no c++ compiler."
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

適切な修正をいただければ幸いです。

conda install m2w64-toolchainで試した後。別のエラーが発生します。

*You can find the C code in this temporary file: C:\Users\CERTAI~1\AppData\Local\Temp\theano_compilation_error_7bgw9_s9
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 75, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 92, in <module>
    raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\shubhamprojectwork\all Work 2018\kaggle\DeepLearningPython35-master\DeepLearningPython35-master\test.py", line 156, in <module>
    import network3
  File "C:\shubhamprojectwork\all Work 2018\kaggle\DeepLearningPython35-master\DeepLearningPython35-master\network3.py", line 37, in <module>
    import theano
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\__init__.py", line 110, in <module>
    from theano.compile import (
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\compile\__init__.py", line 12, in <module>
    from theano.compile.mode import *
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\compile\mode.py", line 11, in <module>
    import theano.gof.vm
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\vm.py", line 673, in <module>
    from . import lazylinker_c
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
    preargs=args)
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\gof\cmodule.py", line 2359, in compile_str
    (status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `_import_array':
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1470: undefined reference to `__imp_PyExc_ImportError'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1476: undefined reference to `__imp_PyExc_AttributeError'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1481: undefined reference to `__imp_PyCapsule_Type'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1482: undefined reference to `__imp_PyExc_RuntimeError'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1497: undefined reference to `__imp_PyExc_RuntimeError'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1505: undefined reference to `__imp_PyExc_RuntimeError'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1511: undefined reference to `__imp_PyExc_RuntimeError'
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1521: undefined reference to `__imp_PyExc_RuntimeError'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o:C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/__multiarray_api.h:1533: more undefined references to `__imp_PyExc_RuntimeError' follow
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `NpyCapsule_Check':
. C:/ProgramData/Anaconda3/lib/site-packages/numpy/core/include/numpy/npy_3kcompat.h:456: undefined reference to `__imp_PyCapsule_Type'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `unpack_list_of_ssize_t':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:48: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:58: undefined reference to `__imp_PyExc_IndexError'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `CLazyLinker_init':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:352: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:370: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:385: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:389: undefined reference to `__imp_PyExc_IndexError'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o:C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:393: more undefined references to `__imp_PyExc_IndexError' follow
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `CLazyLinker_init':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:405: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:420: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:426: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:440: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:444: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `c_call':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:545: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:545: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:545: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:546: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o:C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:546: more undefined references to `__imp__Py_NoneStruct' follow
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `lazy_rec_eval':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:618: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:641: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:649: undefined reference to `__imp_PyExc_ValueError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:657: undefined reference to `__imp_PyExc_IndexError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:708: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:715: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:721: undefined reference to `__imp_PyExc_TypeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:771: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:771: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:772: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `CLazyLinker_call':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:814: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:826: undefined reference to `__imp_PyExc_RuntimeError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:839: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:839: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:840: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:849: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:849: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o:C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:850: more undefined references to `__imp__Py_NoneStruct' follow
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `CLazyLinker_call':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:894: undefined reference to `__imp_PyExc_AssertionError'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:937: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:937: undefined reference to `__imp__Py_NoneStruct'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:938: undefined reference to `__imp__Py_NoneStruct'
. C:\Users\CERTAI~1\AppData\Local\Temp\ccFdFXU1.o: In function `CLazyLinker_set_allow_gc':
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:973: undefined reference to `__imp_PyBool_Type'
. C:/Users/Certainty1/AppData/Local/Theano/compiledir_Windows-10-10.0.16299-SP0-Intel64_Family_6_Model_142_Stepping_9_GenuineIntel-3.6.1-64/lazylinker_ext/mod.cpp:976: undefined reference to `__imp__Py_TrueStruct'
. collect2.exe: error: ld returned 1 exit status
.* 
3
Shubham Sharma

私の個人的な経験によると、連続したエラーは、Windows用のpython * .dllが存在しない(または単に見つからない)ことが原因です。この問題は、「conda installlibpython」で解決できます。

4
J.Melody

同じエラーが発生しました。私のPCにはpython 3.6。これを実行しました:
1。 condaをアンインストールして再インストールしました。
2。 condaを使用してpython 3.5で環境を作成しました
3。 m2w64をインストール-環境にツールチェーン

そしてそれはうまくいきました!

1
Shaik Adil

私は昨日これと同じ問題に遭遇しました。

Theanoがこれを機能させるために必要なので、私はg ++をダウンロードしてインストールしました

ダウンロードとインストールの方法については、このリンクをたどってください

http://www.instructables.com/id/How-to-Install-MinGW-GCCG-Compiler-in-Windows-XP78/

環境にパスを追加した後、anacondaをアンインストールして再インストールしました。

python 3.5をアクティブ化してから、ここの手順に従ってtheanoをインストールするための新しい環境を作成しました

http://deeplearning.net/software/theano/install_windows.html

彼らのステップは私のpythonを2.7にダウングレードしました

それから私は次のことをしました

1:pip install future 2:pip installpillow 3:conda install nb_conda_kernels 4:pip install future --upgrade 5:環境変数を追加しました--MKL_THREADING_LAYER = GNU 6:ターミナルを再起動すると、すべてが機能します。

後続の環境でこれらの最初の手順を実行する必要はありませんでしたpython 3.5環境をアクティブ化した後、

conda install theanoは、私が必要とするすべてのものを設定しました

それが役に立てば幸い

0
Willower