How to install theano library on OS X?

天大地大妈咪最大 提交于 2019-12-13 03:56:53

问题


In my machine learning course we are going to start using theano, a very well known library for deep learning architectures. I all ready installed it with the following command:

$ pip install Theano

By the way, when i want to test if it installed correctly, the python interpreter can´t fin the module. I dont know if im installing it right. Reading the documentation i found anaconda, is it right to first install anaconda and then try to install again with pip theano?. Is this the right way to install this library on MAC OS X?. How can i install this library correctly in order to use theano succesfully?


回答1:


Installing Python with Homebrew and installing Theano with pip after that worked fine for me. I just needed to install nose after that to be able to run the tests.

brew install python
pip install Theano
pip install nose

I cannot help much installing the framework with Anaconda though.




回答2:


Consider installing Theano in a virtual enviroment as oppose to installing it globally via sudo. The significance of this step is nicely described here. In your terminal window, do the following:

virtualenv --system-site-packages -p python2.7 theano-env
source theano-env/bin/activate
pip install -r https://raw.githubusercontent.com/Lasagne/Lasagne/v0.1/requirements.txt



回答3:


Anaconda is indeed highly recommended for python libraries. In fact, Anaconda is not only for python in contrast to pip. You can read more here: What is the difference between pip and conda?

For installing Theano, I had already installed Anaconda. I just simply did:

conda install theano

Then, in Ipython, I successfully imported theano:

import theano



来源:https://stackoverflow.com/questions/24728255/how-to-install-theano-library-on-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!