theano安裝問題


WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
D:\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.

按照正常的順序安裝完(http://www.deeplearning.net/software/theano/install.html),提示警告,如上。

於是,conda install m2w64-toolchain。

爆出一堆錯誤

於是,conda install libpython (https://blog.csdn.net/weixin_40849273/article/details/85266465)

更是一堆錯誤

 

Traceback (most recent call last):
  File "D:\Anaconda3\lib\configparser.py", line 1135, in _unify_values
    sectiondict = self._sections[section]
KeyError: 'blas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\lib\site-packages\theano\configparser.py", line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
  File "D:\Anaconda3\lib\configparser.py", line 778, in get
    d = self._unify_values(section, vars)
  File "D:\Anaconda3\lib\configparser.py", line 1138, in _unify_values
    raise NoSectionError(section)
configparser.NoSectionError: No section: 'blas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\lib\site-packages\theano\configparser.py", line 328, in __get__
    delete_key=delete_key)
  File "D:\Anaconda3\lib\site-packages\theano\configparser.py", line 172, in fetch_val_for_key
    raise KeyError(key)
KeyError: 'blas.ldflags'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda3\lib\site-packages\theano\__init__.py", line 124, in <module>
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
  File "D:\Anaconda3\lib\site-packages\theano\scan_module\__init__.py", line 41, in <module>
    from theano.scan_module import scan_opt
  File "D:\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py", line 60, in <module>
    from theano import tensor, scalar
  File "D:\Anaconda3\lib\site-packages\theano\tensor\__init__.py", line 17, in <module>
    from theano.tensor import blas
  File "D:\Anaconda3\lib\site-packages\theano\tensor\blas.py", line 155, in <module>
    from theano.tensor.blas_headers import blas_header_text
  File "D:\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py", line 987, in <module>
    if not config.blas.ldflags:
  File "D:\Anaconda3\lib\site-packages\theano\configparser.py", line 332, in __get__
    val_str = self.default()
  File "D:\Anaconda3\lib\site-packages\theano\configdefaults.py", line 1422, in default_blas_ldflags
    check_mkl_openmp()
  File "D:\Anaconda3\lib\site-packages\theano\configdefaults.py", line 1262, in check_mkl_openmp
    """)
RuntimeError:
To use MKL 2018 with Theano either update the numpy conda packages to
their latest build or set "MKL_THREADING_LAYER=GNU" in your
environment.

 

於是,新建環境變量MKL_THREADING_LAYER=GNU

似乎不管用

於是,conda update numpy

solved。

 

可以使用theano,但是當我嘗試使用theano.scan時,

Process finished with exit code -1073741819 (0xC0000005)

牆內牆外多番查找,最終發現此貼可用!(https://blog.csdn.net/wangguan9527/article/details/82845409)

solved。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM