ubuntu下安装theano环境

来源:互联网 发布:景安域名转入 编辑:程序博客网 时间:2024/06/05 02:06

环境bash on windows即ubuntu14.04


先修改apt源,推荐使用中科大的镜像

 

https://lug.ustc.edu.cn/wiki/mirrors/help/ubuntu

可以直接使用以下命令修改


sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list


更新apt

sudo apt-get update
sudo apt-get upgrade

接下来依次安装gfortranblaslapackatlasnumpyscipytheano

sudo apt-get install gfortransudo apt-get install libopenblas-devsudo apt-get install liblapack-devsudo apt-get install libatlas-base-dev

安装pip

sudo apt-get install pip
更新pip源(以清华大学源为例

linux下修改 ~/.pip/pip.conf文件夹不存在就新建一个

修改内容

[global]index-url = https://pypi.tuna.tsinghua.edu.cn/simple

然后就是numpuscipy的安装,不过之前要安装nose


安装nose


sudo pip install nose

numpyscipy的安装


安装numpy

sudo pip install numpy


检验numpy是否安装完成


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

安装scipy

Sudo pipinstall scipy

 

检验scipy是否安装完成

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

 

安装theano

 

sudo pipinstall Theano

 

检验theano是否安装完成

 

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

 

等待一会儿,如果跑出了数字就安装完成了


numpy,scipy,theano检验不报错即可