简体   繁体   English

无法让Theano在Ubuntu 14.04上工作

[英]Can't get Theano to work on ubuntu 14.04

I'm trying to use Theano on ubuntu 14.04, I've followed the guide for an easy install located here http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu 我正在尝试在ubuntu 14.04上使用Theano,我已经按照指南进行了轻松安装,该指南位于http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu

Everything says it's installed fine, if I run: 一切都说安装正确,如果我运行:

sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git

Then I get in return 然后我得到回报

Reading package lists... Done
Building dependency tree 
Reading state information... Done
g++ is already the newest version.
git is already the newest version.
python-dev is already the newest version.
python-nose is already the newest version.
python-numpy is already the newest version.
libopenblas-dev is already the newest version.
python-pip is already the newest version.
python-scipy is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 18 not to upgrade.

And when running 而当跑步

sudo pip install Theano

I get 我懂了

Requirement already satisfied (use --upgrade to upgrade): Theano in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.5.0 in ./.local/lib/python2.7/site-packages (from Theano)
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.7.2 in /usr/lib/python2.7/dist-packages (from Theano)
Cleaning up...

But when I go to run the tests they just don't work. 但是,当我去运行测试时,它们只是不起作用。

python -c "import numpy; numpy.test()"

gives me 给我

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/josh/.local/lib/python2.7/site-packages/numpy/__init__.py", line 153, in <module>
    from . import add_newdocs
  File "/home/josh/.local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/home/josh/.local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/home/josh/.local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/home/josh/.local/lib/python2.7/site-packages/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: /home/josh/.local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS4_AsUnicodeEscapeString

and

python -c "import scipy; scipy.test()"

gives me 给我

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named scipy

The last test gives very similar results 最后的测试给出了非常相似的结果

josh@josh-GA-78LMT-S2P:~$ python -c "import theano; theano.test()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named theano

I'm a complete linux newbie so I'm completely baffled by what could be the problem. 我是一个完整的linux新手,所以我完全不知道可能是什么问题。

If you can, I would simply use a "scientific" Python - either Anaconda (my preference) or Enthought Python. 如果可以的话,我将只使用“科学” Python- Anaconda (我的偏爱)或Enthought Python。 In addition to avoiding systemwide installation of packages, it is easy to install things with pip and numpy and scipy come preinstalled. 除了避免在系统范围内安装软件包外,还可以通过预先安装pip和numpy和scipy进行安装。 For updating numpy and scipy you can also use the built-in conda package manager - it does an excellent job of handling the nasty work behind installing a new numpy or scipy. 为了更新numpy和scipy,您还可以使用内置的conda软件包管理器-在安装新的numpy或scipy之后,它在处理讨厌的工作方面做得非常好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM