在Linux上安装Blocks

3
我正在尝试在我的Linux机器上安装Blocks,但遇到了一些问题。我该如何解决?我正在执行以下步骤:
  1. 安装Anaconda for python2
  2. Theano依赖于numpy 1.10.1版本。如果在这一步中我在python shell中运行import theano,那么它将完美地工作。
  3. 好的,是时候安装Blocks了。我使用pip install --user git+git://github.com/mila-udem/blocks.git \ -r https://raw.githubusercontent.com/mila-udem/blocks/master/requirements.txt来安装稳定版本。
  4. 在这一步之后,如果我导入theano,它会给出以下提示:RuntimeError: module compiled against API version a but this version of numpy is 9
  5. 我查看了requirements.txt并发现Blocks依赖于numpy 1.9.3。
  6. 我卸载了Theano、Blocks,并使用conda install numpy=1.9.3降级numpy,然后再次运行pip install --user git+git://github.com/mila-udem/blocks.git \ -r https://raw.githubusercontent.com/mila-udem/blocks/master/requirements.txt,但是在导入theano时仍然会给出RuntimeError: module compiled against API version a but this version of numpy is 9

我该如何克服这个问题?


这可能是Anaconda发行版的问题。您可以尝试通过conda update condaconda update --all更新所有Anaconda。您还可以尝试更改Blocks requirements.txt以引用numpy 1.10.1,因为Blocks很可能不会关心从1.9到1.10的更改。 - Daniel Renshaw
@DanielRenshaw,谢谢!那个有效,但现在我有另一个麻烦:我正在尝试重现Blocks教程,但每次在这一步失败:mnist = MNIST(("train",))。它输出 fuel.exceptions.ConfigurationError: Configuration not set and no default provided: data_path. - Jihad
1
那似乎与此无关。我建议创建一个新问题,并提供所有细节。 - Daniel Renshaw
1
这与此无关。您必须设置此路径以启用燃料。请参阅燃料安装文档。 - sygi
1个回答

0
这可能是Anaconda分发的问题。您可以尝试通过conda update condaconda update --all更新所有Anaconda。您还可以尝试更改Blocks requirements.txt以引用numpy 1.10.1,因为Blocks很可能不会关心从1.9到1.10的更改。 - Daniel Renshaw

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接