gpt4 book ai didi

python - 使用 python centos-7 安装 theano

转载 作者:行者123 更新时间:2023-12-04 19:37:27 25 4
gpt4 key购买 nike

按照此处的说明,我可以使用 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: fatal error :Python.h:没有文件或目录。 #包括 。 ^。编译终止..

最佳答案

似乎您没有正确安装 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 .

关于python - 使用 python centos-7 安装 theano,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39902181/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com