【问题标题】:install theano with python centos-7使用 python centos-7 安装 theano
【发布时间】:2016-10-06 17:25:08
【问题描述】:

按照此处的说明,我可以使用 python2 成功安装 theano http://deeplearning.net/software/theano/install_centos6.html#install-centos6。 由于我没有 root 访问权限,因此我要求我的管理员安装上述所需的其他软件包。

sudo yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel.

这适用于 python2 但不适用于 python3。 python3需要他们的附加包吗? 用python3运行会报错

.theano/compiledir_Linux-3.10-el7.x86_64-x86_64-with-centos-7.2.1511-Core-x86_64-3.4.3-64/lazylinker_ext/mod.cpp:1:20:致命错误:Python.h : 没有相应的文件和目录。 #包括 。 ^。编译终止..

【问题讨论】:

  • 为什么它不能在 python 3 上运行?你得到什么错误信息?您能否更新您的答案以更详细?
  • 我添加了使用python3执行时遇到的错误

标签: python centos theano


【解决方案1】:

似乎您没有正确安装 python 开发的所有头文件和静态库。如果您有管理问题,您可以使用来自 https://www.continuum.io/downloads 的 Anaconda 否则,最首选的方法是使用包管理器在系统范围内安装它们。

sudo yum install python-devel

编辑:您可以在没有管理员权限的情况下使用 anaconda 安装 theano。您可以为您的系统下载 anaconda 的软件包,设置 python 编译器的适当路径,然后使用conda install theano 安装 theano。此外,您可以安装 libgpuarray 和 pygpu,这是使用 theano 新后端的依赖项,无需管理员权限,您可以找到说明 http://deeplearning.net/software/libgpuarray/installation.html#step-by-step-install

【讨论】:

  • 我没有管理员权限,但要求我的管理员安装这些软件包 sudo yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-开发。安装这些之后,我可以使用 python2 运行 theano,但不能使用 python3。我以前没有使用过 Anaconda,我可以在没有管理员权限的情况下使用 Anaconda 安装这些必需的软件包吗?
  • 是的,您可以使用 anaconda 进行安装。我会更新答案
猜你喜欢
  • 2022-08-15
  • 1970-01-01
  • 2020-04-10
  • 1970-01-01
  • 2017-05-27
  • 2018-07-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多