簡體   English   中英

Anaconda Theano - 安裝錯誤

[英]Anaconda Theano - installation error

我正在暫停這個設置說明: https//machinelearningmastery.com/setup-python-environment-machine-learning-deep-learning-anaconda但是我在最后遇到了這個問題,我不知道如何解決這個問題:

(base) C:\Users\andrz>python deep_versions.py
Traceback (most recent call last):
File “C:\Users\andrz\Anaconda3\lib\configparser.py”, line 1138, in _unify_values
sectiondict = self._sections[section]
KeyError: ‘blas’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 168, in fetch_val_for_key
return theano_cfg.get(section, option)
File “C:\Users\andrz\Anaconda3\lib\configparser.py”, line 781, in get
d = self._unify_values(section, vars)
File “C:\Users\andrz\Anaconda3\lib\configparser.py”, line 1141, 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 “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 328, in __get__
delete_key=delete_key)
File “C:\Users\andrz\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 “deep_versions.py”, line 2, in
import theano
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\__init__.py”, line 124, in
from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\scan_module\__init__.py”, line 41, in
from theano.scan_module import scan_opt
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\scan_module\scan_opt.py”, line 60, in
from theano import tensor, scalar
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\tensor\__init__.py”, line 17, in
from theano.tensor import blas
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\tensor\blas.py”, line 155, in
from theano.tensor.blas_headers import blas_header_text
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\tensor\blas_headers.py”, line 987, in
if not config.blas.ldflags:
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configparser.py”, line 332, in __get__
val_str = self.default()
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1430, in default_blas_ldflags
check_mkl_openmp()
File “C:\Users\andrz\Anaconda3\lib\site-packages\theano\configdefaults.py”, line 1252, in check_mkl_openmp
raise RuntimeError(‘To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.’)
RuntimeError: To use MKL 2018 with Theano you MUST set “MKL_THREADING_LAYER=GNU” in your environement.

我有完全相同的錯誤。 在其他論壇上有人建議MKL 2018中有一個錯誤。對我來說,問題是通過降級到MKL 2017來解決的。我通過Miniconda安裝:

conda install mkl=2017

這也意味着降級其他幾個依賴包,但我沒有遇到任何問題。 您還必須確保軟件包安裝在正確的環境中。 請讓我知道這對你有沒有用。

我最初將mkl2018降級為mkl2017,但后來遇到了theano和numpy的問題。

對我有用的解決方案是在錯誤的底部做它所說的:

將新的環境變量“MKL_THREADING_LAYER”設置為值“GNU”。 這個解決方案(更詳細)來自https://github.com/Theano/Theano/issues/6568

我也有同樣的問題:

conda uninstall theano
conda uninstall mkl=2018
conda install mkl=2017
conda install theano

只有那些我需要降級的人。 它發生在后來,當我用pip安裝其他數據包時,我不小心升級到了mlk = 2018。 然后theano正在為我工​​作仍然工作,不知道如何。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM