python:theano导入错误“MKL_THREADING_LAYER = GNU”

问题描述 投票:3回答:2

导入theano包时:

from theano import tensor, scalar

我收到以下错误:

To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.

所以我在这里查看了详细信息:https://pypkg.com/pypi/theano/f/theano/configdefaults.py

然后尝试在anaconda上安装mkl-service:

conda install -c anaconda mkl-service

但是,我得到了同样的错误。

有任何想法吗?我在anaconda jupyter笔记本上运行python的AWS ubuntu盒子上。

谢谢!

python amazon-web-services ubuntu theano
2个回答
1
投票

我得到了同样的错误。我正在使用Windows。为解决此问题,我在Windows 10中添加了系统变量,如下所示:

控制面板 - >系统和安全 - >系统 - >高级系统设置 - >环境变量 - >添加变量名称='MKL_THREADING_LAYER'和变量值='GNU'的新系统变量,然后单击“确定”。

我认为在ubuntu中你应该在.bashrc中进行更改


-1
投票

在终端上尝试这个来解决它:

cd;echo "export MKL_THREADING_LAYER='GNU'" >> .bashrc;
source .bashrc

如果您使用的是Anaconda,请重新启动它。

© www.soinside.com 2019 - 2024. All rights reserved.