水蟒水蟒装置

2024-09-27 00:14:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我在看安装说明: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.

Tags: inpyscanlibpackageslineexceptionsite
3条回答

我也犯了同样的错误。在其他论坛上,有人认为MKL 2018存在缺陷。对我来说,问题是通过降级到MKL2017解决的。我通过Miniconda安装了:

conda install mkl=2017

这也意味着降级其他几个依赖的包,但我没有遇到任何问题。您还必须确保软件包安装在正确的环境中。如果对你有用,请告诉我。在

我最初将mkl2018降级为mkl2017,但后来遇到了theano和numpy的问题。在

对我有效的解决方案是按照错误底部的说明操作:

将新环境变量“MKL_THREADING_LAYER”设置为值“GNU”。这个soln(更多细节)来自https://github.com/Theano/Theano/issues/6568

也有同样的问题,我做了如下:

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

只有那些我需要降级的。后来,我在用pip安装其他数据包时意外升级到mlk=2018。但后来西亚诺还在为我工作,不知道怎么做。在

相关问题 更多 >

    热门问题