安装PlaidML Keras

时间:2019-08-17 19:49:00

标签: python keras

我正在尝试安装PlaidML,并按照Github上的说明进行操作。基本上,我在这里与用户所在区域相同:

How to install plaidML / plaidML-keras

我遵循了回答该问题的开发人员的指示,但plaidml-setup仍然不起作用。

我创建了一个conda环境,并使用pip3安装了PlaidML。路径是

/usr/local/lib/python3.7/site-packages (0.6.4). 

运行plaidml-setup的错误是:

Traceback (most recent call last):
  File "/usr/local/bin/plaidml-setup", line 6, in <module>
from plaidml.plaidml_setup import main

  File "/usr/local/lib/python3.7/site-packages/plaidml/__init__.py", line 50, in <module>
import plaidml.settings

  File "/usr/local/lib/python3.7/site-packages/plaidml/settings.py", line 33, in <module>
_setup_config('PLAIDML_EXPERIMENTAL_CONFIG', 'experimental.json')

  File "/usr/local/lib/python3.7/site-packages/plaidml/settings.py", line 30, in _setup_config
    'Could not find PlaidML configuration file: "{}".'.format(filename))

plaidml.exceptions.PlaidMLError: Could not find PlaidML configuration file: "experimental.json".

按照开发人员的说明,我从虚拟环境导航到以下内容,并找到以下文件。

(tensorflow) ➜  ~ cd /usr/local/share/plaidml                                               
(tensorflow) ➜  plaidml 
(tensorflow) ➜  plaidml ls
config.json          experimental.json    plaidml-config.cmake

1 个答案:

答案 0 :(得分:0)

在创建我的虚拟环境之后,我只是忘了先做pip3 install keras,然后再做pip3 install tensorflow。